Skip to content

Setting Up AWS Website

Adam Modras edited this page Aug 8, 2018 · 1 revision

Configure AWS website for Travis CI integration

  • Set up AWS account using email address: C##########A@G####L.COM

  • Set up needed policies from within the IAM Service


Create the following custom policies within IAM:

CodeDeployDemo-EC2-Permissions

{ "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:Get*", "s3:List*" ], "Effect": "Allow", "Resource": "*" } ] }

Travis-Deploy-To-S3

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject" ], "Resource": [ "*" ] } ] }

Travis-Code-Deploy-Policy Resource

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "codedeploy:RegisterApplicationRevision", "codedeploy:GetApplicationRevision" ], "Resource": ["arn:aws:codedeploy:ServerRegionHERE:076002291156:application:NameOfTheCodeDeployApplicationNameHERE" ] }, { "Effect": "Allow", "Action": [ "codedeploy:CreateDeployment", "codedeploy:GetDeployment" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "codedeploy:GetDeploymentConfig" ], "Resource": [ "arn:aws:codedeploy:ServerRegionHERE:AccIdHERE:deploymentconfig:CodeDeployDefault.OneAtATime", "arn:aws:codedeploy:ServerRegionHERE:AccIdHERE:deploymentconfig:CodeDeployDefault.HalfAtATime", "arn:aws:codedeploy:ServerRegionHERE:AccIdHERE:deploymentconfig:CodeDeployDefault.AllAtOnce" ] } ]


Create Travis User for Access to AWS account:

Create user and then set up the user policies to include the 2 Travis policies that were previously created.

User Travis was created and all of the access information has been saved to secure slack channel.

Create Role for EC2 access and call it CodeDeploy_EC2_DEPLOY_INSTANCE.

Attach the CodeDeployDemo-EC2-Permissions policy to this role.

Create Role for CodeDeploy access and call it CodeDeployServiceRole.

Attach the AWSCodeDeployRole policy to this role.

Create S3 Bucket:

S3 Deployment Tutorial
S3 Static Site Tutorial