We can upload an object and grant public read access using a canned ACL as follows:
- Download the image file using the admin user profile. On this occasion, downloading should be successful:
- Upload the same file as an administrator, providing the canned ACL for public-read:
aws s3 cp image-heartin-k.png s3://awsseccookbook/image-heartin-new.png
--acl public-read
--profile awssecadmin
- Download the new file using the testuser profile:
We should now be able to download the file successfully.