You will need about one minute to read this article.
You can find a sample repo for deploying to AWS with Codeship Pro on Github.
To make it easy for you to deploy your application to AWS CodeDeploy, we’ve built a container that has the AWSCLI installed. We will set up a simple example showing you how to configure any deployment to AWS CodeDeploy.
Codeship Pro uses an AWS deployment container that we maintain to authenticate with your AWS account.
Please review our AWS documentation to learn how to set up and use this authentication container.
It is also advised that you review AWS’ IAM documentation to find the correct policies for your account.
Deployment to Elastic Beanstalk uses a
codeship_aws codedeploy_deploy command in the
codeship/aws-deployment container that we’ve defined, so that you can get started quickly.
Add the following into your codeship-steps.yml file:
- service: awsdeployment command: codeship_aws codedeploy_deploy /PATH/TO/YOUR/CODE APPLICATION_NAME DEPLOYMENT_GROUP_NAME S3_BUCKET_NAME
This command will zip your application code, upload it to S3 and start a new deployment on CodeDeploy. You can take a look at the full script if you would like to review or modify it.
Note that you will need to make sure that the IAM User used with Codeship has all necessary permissions to interact with CodeDeploy. Take a look at the getting started documentation from AWS to get the full policy template.
Do you think we need to improve this article? If so, please submit our feedback form to help us improve this article!