Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3FullAccess Policy doesn't grant access to tags #1063

Closed
andreineacsu opened this issue Aug 5, 2019 · 4 comments
Closed

S3FullAccess Policy doesn't grant access to tags #1063

andreineacsu opened this issue Aug 5, 2019 · 4 comments
Labels

Comments

@andreineacsu
Copy link

Hello,

I am currently working on a SAM application that requires full access on an S3 bucket.
I'm setting the S3FullAccess policy on the Lambda function that requires full access but it doesn't work because this policy doesn't have access to file tags. Can this policy be modified so that it includes access to file tags and metadata?

Also, is there any way to define custom SAM policies?

Thanks,
Andrei

@keetonian
Copy link
Contributor

@andreineacsu yes, it is possible to define custom policies on a Serverless::Function resource. You can put a policy document into the Policies property. Here is an example; please scope it down to the permissions and resources you need.

      Policies:
        - Statement:
          - Action: [ 's3:*' ]
            Effect: Allow
            Resource: '*'

As for updates to S3FullAccess policy, there are several actions that deal with tagging. I think all of these are necessary to support tagging on both objects and object versions, can you confirm this?

  • DeleteObjectTagging
  • DeleteObjectVersionTagging
  • GetObjectTagging
  • GetObjectVersionTagging
  • PutObjectTagging
  • PutObjectVersionTagging

(Taken from the S3 permissions documentation)

@andreineacsu
Copy link
Author

@keetonian Thank you for your reply! Everything looks good now.
The tag related permissions you listed and all needed - at least in my case.

@keetonian
Copy link
Contributor

To add these extra permissions, we need to update the S3FullAccess Policy Template with the permissions I listed above in my comment, and update any failing tests.

@ShreyaGangishetty
Copy link

Closing this issue as v1.15.0 is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants