Skip to content

S3 SecurityΒΆ

  • User based
    • IAM Policy - which API calls should be allowed for a specific user from IAM console
  • Resource based
    • [[bucket policy]] - bucket wide rules from the s3 console - allows cross account
    • [[Object Access Control List (ACL)]] - finer grain
    • [[Bucket Access Control List (ACL)]] - less common
  • [[JSON]] based policies
    • Resources - buckets and objects
    • Actions - set of API to allow or deny
    • Effect - Allow or deny
    • Principal - the account or user to apply the policy to
  • Use AWS S3 Bucket for policy to:

    • Grant public access to the bucket
    • Force objects to be encrypted at upload
    • Grant access to another account (cross account)
  • Other:

The permissions can be modified in the permissions tab of the AWS S3 Bucket.

When using the Bucket Policy tag, we can use https://awspolicygen.s3.amazonaws.com/policygen.html to generate the [[JSON]] code.