Menu
AWS CodeDeploy
User Guide (API Version 2014-10-06)

Working with Instances for AWS CodeDeploy

AWS CodeDeploy supports deployments to instances running Amazon Linux, Ubuntu Server, Red Hat Enterprise Linux (RHEL), and Windows Server.

You can use AWS CodeDeploy to deploy to both Amazon EC2 instances and on-premises instances. An on-premises instance is any physical device that is not an Amazon EC2 instance and that can run the AWS CodeDeploy agent and connect to public AWS service endpoints. You can use AWS CodeDeploy to simultaneously deploy an application to Amazon EC2 instances running in the cloud and to desktop PCs running in your office or servers in your own data center.

Comparing Amazon EC2 Instances to On-Premises Instances

The following table compares Amazon EC2 instances and on-premises instances:

Subject Amazon EC2 Instances On-Premises Instances

Requires you to install and run a version of the AWS CodeDeploy agent that's compatible with the operating system running on the instance.

Yes

Yes

Requires the instance to be able to connect to the AWS CodeDeploy service.

Yes

Yes

Requires an IAM instance profile to be attached to the instance. The IAM instance profile must have permissions to participate in AWS CodeDeploy deployments. For information, see Step 4: Create an IAM Instance Profile.

Yes

No

Requires you to do one of the following to authenticate and register instances:

  • Create an IAM user for each instance and store the IAM user's account credentials in plain text on the instance.

  • Create an IAM role that can be assumed by an IAM user on each instance to retrieve periodically refreshed temporary credentials generated through AWS Security Token Service.

No

Yes

Requires you to register each instance with AWS CodeDeploy before you can deploy to it.

No

Yes

Requires you to tag each instance before AWS CodeDeploy can deploy to it.

Yes

Yes

Can participate in Auto Scaling and Elastic Load Balancing scenarios as part of AWS CodeDeploy deployments.

Yes

No

Can be deployed from Amazon S3 buckets and GitHub repositories.

Yes

Yes

Can support triggers that prompt the sending of SMS or email notifications when specified events occur in deployments or instances.

Yes

Yes

Is subject to being billed for associated deployments.

No

Yes

Instance Tasks for AWS CodeDeploy

To launch or configure instances for use in deployments, choose from the following instructions:

I want to launch a new Amazon Linux or Windows Server Amazon EC2 instance.

To launch the Amazon EC2 instance with the least amount of effort, see Create an Amazon EC2 Instance (AWS CloudFormation Template).

To launch the Amazon EC2 instance mostly on your own, see Create an Amazon EC2 Instance (AWS CLI or Amazon EC2 Console).

I want to launch a new Ubuntu Server or RHEL Amazon EC2 instance.

See Create an Amazon EC2 Instance (AWS CLI or Amazon EC2 Console).

I want to configure an Amazon Linux, Windows Server, Ubuntu Server, or RHEL Amazon EC2 instance. See Configure an Amazon EC2 Instance.
I want to configure a Windows Server, Ubuntu Server, or RHEL on-premises instance (physical devices that are not Amazon EC2 instances). See Working with On-Premises Instances.
I want AWS CodeDeploy to provision a replacement fleet of instances during a blue/green deployment. See Working with Deployments.

To prepare Amazon EC2 instances in Auto Scaling groups, you must follow some additional steps. For more information, see Auto Scaling.