DEV Community

Discussion on: How to upload images to Amazon S3 using the AWS Amplify Storage module

Collapse
 
jknapp25 profile image
Josh • Edited

Thank you for the article daniel! I just wanted to mention a few items that might help improve this article for those that may be searching for this information like myself.

As a new AWS user a stumbling block for me was understanding where the CORS configuration was set, seeing as your description does not show where that is input. Also, the AWS docs specify this info is XML in their docs, but can be added programmatically as well. Seeing as your config is not XML, and the AWS docs make it difficult to find out how to add this programmatically, I had a hard time figuring out how to add this configuration.

Collapse
 
danielbayerlein profile image
Daniel Bayerlein

Hi Josh, thank you for your feedback.

You can setup the CORS configuration via XML in the AWS Management Console, see docs.aws.amazon.com/AmazonS3/lates... and docs.aws.amazon.com/AmazonS3/lates...

To provide the infrastructure I use the Serverless Framework (serverless.com/). I create the S3 bucket in the "Configure S3 bucket" section including the CORS configuration with the Serverless Framework.