AWS CodeDeploy | Using AWS CodeDeploy Flashcards
How do I get started with AWS CodeDeploy?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
You can sign in to the AWS Management Console and start using AWS CodeDeploy. If you are looking for a quick overview of the service, see Getting Started, which includes a step-by-step tutorial.
Are there any prerequisites for using an existing Amazon EC2 instance with AWS CodeDeploy?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
The Amazon EC2 instance must be associated with an IAM instance profile and should be running a supported operating system. For more information, see Use an Existing Amazon EC2 Instance.
What are the typical steps to go through for deploying an application using AWS CodeDeploy?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
The following diagram shows the typical steps during a deployment. Creating an application and deployment group (see the Concepts section for an explanation of these terms) are typically one-time setup tasks per application. The recurring actions are uploading a revision and deploying it. For a detailed explanation, including step-by-step instructions for each of these tasks, see Deployments.
How can I access AWS CodeDeploy?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
You can access AWS CodeDeploy using the AWS Management Console, the AWS Command Line Interface (AWS CLI), the AWS SDKs, and the AWS CodeDeploy APIs.
What changes do I need to make to my code to deploy using AWS CodeDeploy?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
You don’t need to make any changes to your code. You simply add a configuration file (called an AppSpec file) in the root directory of your revision bundle that specifies the files to be copied and scripts to be executed.
How can I deploy an application from my source control system using AWS CodeDeploy?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
If you are using GitHub, you can deploy a revision in a .zip, .tar, or .tar.gz format from your repository directly to instances. For other source control systems, you can bundle and upload the revision to an Amazon S3 bucket in a .zip, .tar, or .tar.gz format and specify the Amazon S3 location when doing a deployment. If your application needs a build step, make sure that the GitHub repository or the Amazon S3 bucket contains the post-build artifacts. For more information on using GitHub with AWS CodeDeploy, see our product integrations page. For more information on using Amazon S3 for storing revisions, see Push a Revision.
How will AWS CodeDeploy work with my configuration management tool?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
You can invoke your configuration management tool from any deployment lifecycle event hook in the AppSpec file. For example, if you have a Chef recipe that you want to run as part of a deployment, you can do so by specifying it in the appropriate deployment lifecycle event hook in the AppSpec file. In addition, you can leverage your configuration management system to install the AWS CodeDeploy agent on instances. For samples that illustrate using AWS CodeDeploy with configuration management systems such as Chef, Puppet, Ansible, and Saltstack, see our product integrations page.
Can I use AWS CodeDeploy with continuous integration and deployment systems?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
Yes. You can integrate AWS CodeDeploy with your continuous integration and deployment systems by calling the public APIs using the AWS CLI or AWS SDKs. You can find prebuilt integrations and samples on our product integrations page.
How do I get my application on the instances that I just added to the deployment group?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
Deploy the latest revision to the deployment group for the newly added instances to get your application. Except for Amazon EC2 instances that are launched as part of an Auto Scaling group, AWS CodeDeploy doesn’t automatically deploy the latest revision to newly added instances.
How does AWS CodeDeploy work with Auto Scaling?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
You can associate an Auto Scaling group with a deployment group to make sure that newly launched instances always get the latest version of your application. Every time a new Amazon EC2 instance is launched for that Auto Scaling group, it will be first put in a Pending state and a deployment of the last successful revision for that deployment group triggered on that Amazon EC2 instance. If the deployment completes successfully, the state of the Amazon EC2 instance is changed to InService. If that deployment fails, the Amazon EC2 instance is terminated, a new Amazon EC2 instance is launched in Pending state, and a deployment triggered for the newly launched EC2 instance. For more information on Auto Scaling group instance lifecycle events, see Auto Scaling Group Lifecycle.
How do I track the status of a deployment?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
You can track the status of a deployment using the AWS Management Console, the AWS Command Line Interface (AWS CLI), the AWS SDKs, and the AWS CodeDeploy APIs.You can see the overall status of a deployment and drill down further to see the status of each instance and the status of each deployment lifecycle event for the instance. You can also see the log entries corresponding to any failure, making it easy to debug deployment issues without having to log into the instance.
Can I stop an in-flight deployment?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
Yes. When you stop an in-flight deployment, the AWS CodeDeploy service will instruct the agent on each instance to stop executing additional scripts. To get your application back to a consistent state, you can either redeploy the revision, or deploy another revision.
How do I roll back an application to the previous revision?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
To roll back an application to a previous revision, you just need to deploy that revision. AWS CodeDeploy keeps track of the files that were copied for the current revision and removes them before starting a new deployment, so there is no difference between redeploy and roll back. However, you need to make sure that the previous revisions are available for roll back.
Can I use a versioned Amazon S3 bucket to store revisions?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
Yes. You can use a versioned Amazon S3 bucket and specify the version ID to uniquely identify a revision.
What are the service limits when using AWS CodeDeploy?
Using AWS CodeDeploy
AWS CodeDeploy | Developer Tools
For information on the service limits, see Limits. To increase your service limits, submit a request through the AWS Support Center.