Amazon Lightsail storage CORS
04:47 05 Sep 2023

I am trying to set up CORS for AWS Lightsail's object storage! I can read files from object storage on the web, but I can't download them! So, after some research, I found out that I need to use the put-bucket-cors command through the AWS CLI!

I tried specifying the cors.json file with the command:

aws s3api put-bucket-cors --bucket {{bucketName}} --cors-configuration file://~/corsDocument/cors.json

However, I encountered a permission error saying:

An error occurred (AccessDenied) when calling the PutBucketCors operation: Access Denied

How can I resolve this permission issue? Do I need to modify the policy in the IAM account??

cors amazon-lightsail