Created
October 24, 2016 11:06
-
-
Save folsen/1ade78f3cdb2807e39b2f22891033fbd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
CIUSER=ci | |
ACCOUNTID=<account-id> | |
# Create ECR repo | |
aws ecr create-repository <repo> --region <region> | |
# Create the CI user with appropricate permissions | |
aws iam create-user --user-name $CIUSER | |
aws iam attach-user-policy --user-name $CIUSER --policy-arn arn:aws:iam::aws:policy/AWSElasticBeanstalkFullAccess | |
aws iam attach-user-policy --user-name $CIUSER --policy-arn arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess | |
aws iam create-policy --policy-name deploy-bucket-policy --policy-document file://bucket-policy.json | |
aws iam attach-user-policy --user-name $CIUSER --policy-arn arn:aws:iam::$ACCOUNTID:policy/deploy-bucket-policy | |
aws iam create-access-key --user-name $CIUSER > ci-access-key.json | |
aws iam attach-role-policy --role-name aws-elasticbeanstalk-ec2-role --policy-arn arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment