Amazon S3 Credentials
Steps to get Access Key and Secret Access Key
- Click on the Profile icon in the right corner of the screen
- From the dropdown, Click on Security Credentials
- Click on Create Access Key
You will get an Access Key and Secret Access Key
Modify the Bucket Policy
Modify the bucket policy to allow public access. You can do this by adding a new statement to the policy that grants the “s3:GetObject” permission to everyone.
- Navigate to the Permissions tab in your bucket
- Go to Bucket Policy and click Edit
- Add the following statement to the Policy and make sure to change the bucket-name with the name of the bucket you are working with:
{
“Version”: “2012-10-17”,
“Statement”: [
{
“Sid”: “PublicReadGetObject”,
“Effect”: “Allow”,
“Principal”: “*”,
“Action”: [
“s3:GetObject”
],
“Resource”: [
“arn:aws:s3:::bucket-name/*”
]
}
]
}
In the above example, we’re granting everyone the “s3:GetObject” permission by setting the “Principal” field to “*.” We also specify that this policy applies to all objects within the bucket using the wildcard character (*) in the “Resource” field.