Skip to content

Commit 3aff0f3

Browse files
author
Zack Mullaly
committed
Cloudtrail stack for creating an IAM user with a managed policy that we can safely use to let Travis push to S3. Courtesy of Andrew Krug
1 parent f23e76f commit 3aff0f3

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
AWSTemplateFormatVersion: "2010-09-09"
2+
Description: "Sets up a managed policy for Mig to build and deploy to s3."
3+
Parameters:
4+
S3BucketMigBuilds:
5+
Type: "String"
6+
Description: "The S3 bucket that your build job will be writing out to. (arn:aws:s3:::mig-agent-releases)"
7+
Resources:
8+
PutBuildstoS3:
9+
Type: AWS::IAM::ManagedPolicy
10+
Properties:
11+
Description: "Managed policy for travis-ci to put builds to s3."
12+
PolicyDocument:
13+
Version: "2012-10-17"
14+
Statement:
15+
-
16+
Effect: "Allow"
17+
Action: "s3:PutObject"
18+
Resource:
19+
- !Ref S3BucketMigBuilds
20+
-
21+
Effect: "Allow"
22+
Action: "s3:GetObject"
23+
Resource:
24+
- !Ref S3BucketMigBuilds
25+
-
26+
Effect: "Allow"
27+
Action: "s3:DeleteObject"
28+
Resource:
29+
- !Ref S3BucketMigBuilds
30+
BuildUser:
31+
Type: AWS::IAM::User
32+
Properties:
33+
ManagedPolicyArns:
34+
- !Ref PutBuildstoS3
35+
UserName: mig-build-user

0 commit comments

Comments
 (0)