Skip to content

Instantly share code, notes, and snippets.

@NickAger
Last active March 8, 2019 14:03
Show Gist options
  • Save NickAger/c3c52534ed0bcffadddd41b883bf3c2d to your computer and use it in GitHub Desktop.
Save NickAger/c3c52534ed0bcffadddd41b883bf3c2d to your computer and use it in GitHub Desktop.
Minimum policy requirements to access the S3 console for uploading and downloading files
# Permissions to allow access to S3 console for read and write, see:
# https://stackoverflow.com/questions/6615168/is-there-an-s3-policy-for-limiting-access-to-only-see-access-one-bucket
# https://aws.amazon.com/blogs/security/writing-iam-policies-how-to-grant-access-to-an-amazon-s3-bucket/
DeployUser:
Type: AWS::IAM::User
Properties:
UserName: 'aname@domain.com'
LoginProfile:
Password: apassword
# PasswordResetRequired: true
Policies:
- PolicyDocument:
Statement:
- Action:
- s3:GetObject
- s3:PutObject
- s3:AbortMultipartUpload
- s3:GetObjectAcl
- s3:PutObjectAcl
- s3:ListBucket
- s3:GetBucketAcl
- s3:PutBucketAcl
- s3:GetBucketLocation
Effect: Allow
Resource: !Join [ "", [ "arn:aws:s3:::", !Ref BucketName, "/*" ] ]
- Action:
- s3:ListBucket
- s3:GetBucketLocation
- s3:ListBucketMultipartUploads
Effect: Allow
Resource: !Join [ "", [ "arn:aws:s3:::", !Ref BucketName ] ]
Version: '2012-10-17'
PolicyName: WriteAccessToS3BucketFromConsole
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment