Aws CodeDeploy


Aws CodeDeploy

AWS CodeDeploy is a fully managed software deployment solution for Amazon EC2, AWS Fargate, AWS Lambda, and on-premises servers. The service may be scaled to meet your deployment requirements.

Before you begin

  • To use AWS CodeDeploy pipe to deploy your application, you'll need the following:
  • An IAM user with adequate rights is set up to allow the pipe to deploy your application and upload artefacts to an S3 bucket.
  • An Amazon EC2 instance set up for CodeDeploy: For CodeDeploy, I'm using Amazon EC2 Instances.
  • A CodeDeploy Application and Deployment Group have been set up. Here's a little lesson from Amazon Web Services: Create a Deployment Group and an Application Group.
  • Create an AWS S3 bucket for storing deployment artefacts. The convention is application name>-codedeploy-deployment by default. Note: The bucket name must be DNS-compliant (no capital characters allowed). The name of the bucket must begin with a lowercase letter or number).

Steps

1.The AWS CodeDeploy pipe sample repository should be cloned.

2.Bitbucket Pipelines will ask for your AWS credentials. Go to Settings, Pipelines, Repository Variables, and add the following variables to your Bitbucket Repository.

Common Variables

  • Your AWS access key. AWS ACCESS KEY ID (*):
  • Your AWS secret access key is AWS SECRET ACCESS KEY (*). Make sure it's saved as a protected variable.
  • AWS DEFAULT REGION (*): The AWS region code of the area hosting the AWS resources (us-east-1, us-west-2, etc.). See Regions and Endpoints in the Amazon Web Services General Reference for further details.
  • APPLICATION NAME (*): The application's name.
  • COMMAND (*): Upload or deploy mode of operation. To learn more about each mode, go to the Details section.
  • DEBUG: Enable more debug information. The default value is false.

(*) = required variable