Created
January 24, 2017 15:57
-
-
Save philipmw/1f4bc37216faa882f5da4f22d1a2d78a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Philip's Arq backups", | |
"Resources": { | |
"S3Bucket": { | |
"Type": "AWS::S3::Bucket", | |
"Properties": { | |
"BucketName": "pmw-backups-arq" | |
} | |
}, | |
"ArqUser": { | |
"Type": "AWS::IAM::User", | |
"Properties": { | |
"Policies": [ | |
{ | |
"PolicyName": "S3-bucket-access", | |
"PolicyDocument": { | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets" | |
], | |
"Resource": "*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:*" | |
], | |
"Resource": { | |
"Fn::Sub": "arn:aws:s3:::${S3Bucket}" | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:*" | |
], | |
"Resource": { | |
"Fn::Sub": "arn:aws:s3:::${S3Bucket}/*" | |
} | |
} | |
] | |
} | |
} | |
] | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment