That's what I thought
Ah... the search is strong in this one
ok, ill up the version and see if that works... cheers chaps
For the best anyway... 7.0 is EOL
cool, cheers again guys. latest on server is 7.2 and that works fine
Hi Everyone I am trying to add Silverstripe/S3 but have never done it before. I dont see a lot of info to go on in the readme.md can someone point me in the right direction?
Scaling your hosting on the fly has never been easier. Chief Architect at Moosylvania, Joe Madden, explains Flysystem and the SilverStripe S3 module, offering agencies more flexibility to host on new platforms and maintain high performance.Hide attachment content
also https://github.com/silverstripe/silverstripe-s3/issues/26#issuecomment-505525388 should help you
I've installed this module on a 4.3 site and I'm stuck at the following error. I cannot run dev/build... this is the error I get when I try to do that: [Emergency] Uncaught Aws\Exception\Cr...Hide attachment content
Yes I did read the first article. But not sure how to set it up in my config.
Havent even gotten to where its not working on localhost or virtual servers yet
you need to set the right env vars
Ive got an AWS server that I will be testing on so need to make sure I have the settings right then I can test it on there
But completely lost in what to set up
Think I got somewhere. instead of having the stuff set in yml I need to do it in .env but now I got an error which I think is because im on local at the moment
Have you added your secret key correctly and added it?
Haven't used this module, but we backup to S3 and the permissions can be a little fiddly
You backup manually or with flysystem's replication?
I believe I added my secret key correctly. waiting for my site to get on the aws server to see if it is working correctly
Did you get it working? I've just set up a test here, and it seems to be doing what it should
Busy getting server ready to see if it is working
Im getting the following error now: [Unknown Error] Uncaught GuzzleHttp\Exception\ClientException: Client error:
GET http://169.254.169.254/latest/meta-data/iam/security-credentials/ resulted in a
404 Not Found response:
@dorsetdigital can you possibly walk me through what you did to get it to work?
I think I might have done something wrong
I haven't deployed on EC2, so it may be different. I just set up a local site here
Is that the IP address of your server?
No thats not the IP of the server
I have a local version of the site on my PC so If it works on my PC I know what to look for
In my case, it was literally: Install SS4, configure the .env and .yml files, install the S3 module with composer. Dev/build?flush
how does the env and yml file look?
(Obviously I set up the S3 bucket and added an IAM user first to get the credentials)
I got the following credentials set in my env[AWS_REGION, AWS_BUCKET_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY] Did I miss anything there?
That's what mine looks like
Yeah, I just deleted it 😉
ahh you couldnt use the starts for secret key too?
And this is the yml file:
- envvarset: AWS_BUCKET_NAME
- - '#assetsflysystem'
- region: '`AWS_REGION`'
- version: latest
- key: '`AWS_ACCESS_KEY_ID`'
- secret: '`AWS_SECRET_ACCESS_KEY`'
I could have... but you know... time is money
wait so the yml file you dont add the details in there?
No, it's just referencing the environment variables
thats where I was wrong
If you put them in there, I don't think that would have broken anything
well its not throwing an error right now
wait could be the server going nope... give me a few
Don't forget, if you change the yml, you'll probably need to dev/build?flush
Yip. Just waiting for the DB to be added with populated pages then Im going to go further.
Okay getting an access denied
Access denied to what?
to be able to see that error again I need to figure out why its saying that I am using wrong create options for my DB
@dorsetdigital this is the error I am getting: [Emergency] Uncaught Aws\S3\Exception\S3Exception: Error executing "PutObject" on "https://s3.eu-west-1.amazonaws.com/AWS_Bucket/public/error-404.html"; AWS HTTP error: Client error:
PUT https://s3.eu-west-1.amazonaws.com/AWS_Bucket/public/error-404.html resulted in a
403 Forbidden response: AccessDeniedAccess Denied49E57C (truncated...) AccessDenied (client): Access Denied - AccessDeniedAccess
OK, so that looks like the policy on your bucket isn't right, or the IAM user doesn't have the right permissions
how do I know if the policy is right?
I'd check the IAM permissions first.
Okay cool will check that out
okay got that sorted out
now I need to specify the root folder where the assets is sitting on the bucket. any clue on how I would do that?
Do you need to do that? If it's a new bucket, the asset directories just sit in the root
the assets was added in assets/
okay got it in the root of the bucket. My assets are not pulling through from the bucket tho
Pulling through to where? The admin system or the front end?
Are the URLs right in the page? ie. do they point to an S3 resource
If so, can you view the URL in a browser directly?
the url is showing my aws url with the assets attached to the end instead of my s3 bucket
And can you view that directly?
OK. Check that the file is actually in the bucket where it's supposed to be. Then check that the bucket has public viewing permissions for the public assets
The guy who is handeling the servers says that public access is allowed
If that's true, then the file either isn't there, or isn't where it's supposed to be
But would that cause the image to refer to the aws server instead of the bucket?
Oh. When you said AWS url, I thought you meant the bucket
so any clue what it could be?
If the URLs in the front-end are still pointing to the web server, that would suggest the module isn't working
ah okay because the image link starts with assets/ but when i hover over it it shows the aws IP address
Hi @dorsetdigital So you said you set it up to work but does it pull the images from the s3 bucket?
its so strange because I have my settings the same as you showed but its not pulling through but also not throwing an error
I'm not really sure what to suggest to be honest. It should work pretty much out of the box
The only thing I can't be sure of is whether the server makes a difference. I've only set it up with the webserver outside the AWS system, but I don't know what different that would make
I would have thought that it would be easier to get to work with a server on aws than one thats outside
Im thinking it might be a conflict of vendor files... I did try using more than one for the s3 integration so im hoping cleaning up the vendor folder will work
what is the preferred way for importing dataobjects by modeladmin's CSV importer?
upload all assets beforehand through
/admin/assets/, then write down the File.ID as
MyDataFileId in the csv?