aws-amplify / aws-amplify/amplify-cli

Storage: Include option to set s3:PutObjectAcl when granting auth/guest access to allow acl: public-read (currently available) in aws-amplify/Storage.put method options.

Open
#5,322 14 comments 6 reactions 0 assignees View on GitHub
feature-request p3 storage
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

**Is your feature request related to a problem? Please describe.**
Currently when setting authenticated access to storage, you're given the option to set put, read, delete access for both auth and unauth access. The aws-amplify package allows passing an `acl: public-read` ([see "other options"](https://docs.amplify.aws/lib/storage/upload/q/platform/js#encrypted-uploads)). When you try to set this with the default write permissions during setup, you receive a 403 error because the role isn't set up with `PutObjectAcl` - you have to manually add the permission to the `s3PermissionsAuthenticatedPublic` parameter to `storage/parameters.json` before pushing again.

Pretty common use case to upload photos that are publicly accessible, so this seems like a no-brainer.

**Describe the solution you'd like**
Add a "Grant public access" option when specifying auth permissions during setup.

**Describe alternatives you've considered**
Manually adding the permission to the parameters is easy, however, might trip up inexperienced developers who (rightly) expect the `aws-amplify/Storage.put` option 'acl: public-read' to work out of the box.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.