Overview of Deployment Options On Aws
Overview of Deployment Options On Aws
Overview of Deployment Options On Aws
Options on AWS
AWS Whitepaper
Overview of Deployment Options on AWS AWS Whitepaper
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not
Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or
discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may
or may not be affiliated with, connected to, or sponsored by Amazon.
Overview of Deployment Options on AWS AWS Whitepaper
Table of Contents
Abstract ............................................................................................................................................ 1
Abstract .................................................................................................................................... 1
Introduction ...................................................................................................................................... 2
AWS Deployment Services ................................................................................................................... 3
AWS CloudFormation .................................................................................................................. 3
AWS Elastic Beanstalk ................................................................................................................. 5
AWS CodeDeploy ....................................................................................................................... 7
Amazon Elastic Container Service ................................................................................................. 9
Amazon Elastic Kubernetes Service ............................................................................................. 10
AWS OpsWorks ........................................................................................................................ 12
Additional Deployment Services ................................................................................................. 14
Deployment Strategies ...................................................................................................................... 15
Prebaking vs. Bootstrapping AMIs .............................................................................................. 15
Blue/Green Deployments ........................................................................................................... 15
Rolling Deployments ................................................................................................................. 15
In-Place Deployments ............................................................................................................... 16
Combining Deployment Services ................................................................................................ 16
Conclusion ....................................................................................................................................... 17
Contributors .................................................................................................................................... 18
Further Reading ............................................................................................................................... 19
Document Revisions .......................................................................................................................... 20
Notices ............................................................................................................................................ 21
iii
Overview of Deployment Options on AWS AWS Whitepaper
Abstract
Abstract
Amazon Web Services (AWS) offers multiple options for provisioning infrastructure and deploying your
applications. Whether your application architecture is a simple three-tier web application or a complex
set of workloads, AWS offers deployment services to meet the requirements of your application and your
organization.
This whitepaper is intended for those individuals looking for an overview of the different deployment
services offered by AWS. It lays out common features available in these deployment services, and
articulates basic strategies for deploying and updating application stacks.
1
Overview of Deployment Options on AWS AWS Whitepaper
Introduction
Designing a deployment solution for your application is a critical part of building a well-architected
application on AWS. Based on the nature of your application and the underlying services (compute,
storage, database, etc.) that it requires, you can use AWS services to create a flexible deployment
solution that can be tailored to fit the needs of both your application and your organization.
The constantly growing catalog of AWS services not only complicates the process of deciding which
services will compose your application architecture, but also the process of deciding how you will create,
manage, and update your application. When designing a deployment solution on AWS, you should
consider how your solution will address the following capabilities:
• Provision: create the raw infrastructure (Amazon EC2, Amazon Virtual Private Cloud [Amazon VPC],
subnets, etc.) or managed service infrastructure (Amazon Simple Storage Service (Amazon S3),
Amazon Relational Database Service [Amazon RDS], Amazon CloudFront, etc.) required for your
application.
• Configure: customize your infrastructure based on environment, runtime, security, availability,
performance, network or other application requirements.
• Deploy: install or update your application component(s) onto infrastructure resources, and manage the
transition from a previous application version to a new application version.
• Scale: proactively or reactively adjust the amount of resources available to your application based on a
set of user-defined criteria.
• Monitor: provide visibility into the resources that are launched as part of your application architecture.
Track resources usage, deployment success/failure, application health, application logs, configuration
drift, and more.
This whitepaper highlights the deployment services offered by AWS and outlines strategies for designing
a successful deployment architecture for any type of application.
2
Overview of Deployment Options on AWS AWS Whitepaper
AWS CloudFormation
AWS provides a number of services that provide management capabilities for one or more aspects of
your application lifecycle. Depending on your desired balance of control (i.e., manual management of
resources) versus convenience (i.e., AWS management of resources) and the type of application, these
services can be used on their own or combined to create a feature-rich deployment solution. This section
will provide an overview of the AWS services that can be used to enable organizations to more rapidly
and reliably build and deliver applications.
AWS CloudFormation
AWS CloudFormation is a service that enables customers to provision and manage almost any AWS
resource using a custom template language expressed in YAML or JSON. A CloudFormation template
creates infrastructure resources in a group called a “stack,” and allows you to define and customize all
components needed to operate your application while retaining full control of these resources. Using
templates introduces the ability to implement version control on your infrastructure, and the ability to
quickly and reliably replicate your infrastructure.
CloudFormation offers granular control over the provisioning and management of all application
infrastructure components, from low-level components such as route tables or subnet configurations,
to high-level components such as CloudFront distributions. CloudFormation is commonly used with
other AWS deployment services or third-party tools; combining CloudFormation with more specialized
deployment services to manage deployments of application code onto infrastructure components.
AWS offers extensions to the CloudFormation service in addition to its base features:
• AWS Cloud Development Kit (AWS CDK) (AWS CDK) is an open source software development kit (SDK)
to programmatically model AWS infrastructure with TypeScript, Python, Java, or .NET.
• AWS Serverless Application Model (SAM) is an open source framework to simplify building serverless
applications on AWS.
Capability Description
3
Overview of Deployment Options on AWS AWS Whitepaper
AWS CloudFormation
Capability Description
Refer to CloudFormation Template Anatomy for
more details on customizing templates.
The following diagram shows a common use case for CloudFormation. Here, CloudFormation templates
are created to define all infrastructure components necessary to create a simple three-tier web
application. In this example, we are using bootstrap scripts defined in CloudFormation to deploy the
latest version of our application onto EC2 instances; however, it is also a common practice to combine
additional deployment services with CloudFormation (using CloudFormation only for its infrastructure
management and provisioning capabilities). Note that more than one CloudFormation template is used
to create the infrastructure.
4
Overview of Deployment Options on AWS AWS Whitepaper
AWS Elastic Beanstalk
With Elastic Beanstalk, you can quickly deploy, manage, and scale applications without the operational
burden of managing infrastructure. Elastic Beanstalk reduces management complexity for web
applications, making it a good choice for organizations that are new to AWS or wish to deploy a web
application as quickly as possible.
When using Elastic Beanstalk as your deployment solution, simply upload your source code and Elastic
Beanstalk will provision and operate all necessary infrastructure, including servers, databases, load
balancers, networks, and auto scaling groups. Although these resources are created on your behalf, you
retain full control of these resources, allowing developers to customize as needed.
Capability Description
5
Overview of Deployment Options on AWS AWS Whitepaper
AWS Elastic Beanstalk
Capability Description
Refer to Elastic Beanstalk Platforms for more
details on the web application platforms
supported by Elastic Beanstalk.
Elastic Beanstalk makes it easy for web applications to be quickly deployed and managed in AWS. The
following example shows a general use case for Elastic Beanstalk as it is used to deploy a simple web
application.
6
Overview of Deployment Options on AWS AWS Whitepaper
AWS CodeDeploy
AWS CodeDeploy
AWS CodeDeploy is a fully managed deployment service that automates application deployments to
compute services such as Amazon EC2, Amazon Elastic Container Service (Amazon ECS), AWS Lambda,
or on-premises servers. Organizations can use CodeDeploy to automate deployments of an application
and remove error prone manual operations from the deployment process. CodeDeploy can be used with
a wide variety of application content including code, serverless functions, configuration files, and more.
CodeDeploy is intended to be used as a “building block” service that is focused on helping application
developers deploy and update software that is running on existing infrastructure. It is not an end-to-end
application management solution, and is intended to be used in conjunction with other AWS deployment
services such as AWS CodeStar, AWS CodePipeline, other AWS Developer Tools, and third-party services
(see AWS CodeDeploy Product Integrations for a complete list of product integrations) as part of a
complete CI/CD pipeline. Additionally, CodeDeploy does not manage the creation of resources on behalf
of the user.
Capability Description
7
Overview of Deployment Options on AWS AWS Whitepaper
AWS CodeDeploy
Capability Description
The following diagram illustrates a general use case for CodeDeploy as part of a complete CI/CD
solution. In this example, CodeDeploy is used in conjunction with additional AWS Developer Tools,
namely AWS CodePipeline (automate CI/CD pipelines), AWS CodeBuild (build and test application
components), and AWS CodeCommit (source code repository) to deploy an application onto a group of
EC2 instances.
8
Overview of Deployment Options on AWS AWS Whitepaper
Amazon Elastic Container Service
When running applications on Amazon ECS, you can choose to provide the underlying compute power
for your containers with Amazon EC2 instances or with AWS Fargate, a serverless compute engine for
containers. In either case, Amazon ECS automatically places and scales your containers onto your cluster
according to configurations defined by the user. Although Amazon ECS does not create infrastructure
components such as Load Balancers or IAM Roles on your behalf, the Amazon ECS service provides a
number of APIs to simplify the creation and use of these resources in an Amazon ECS cluster.
Amazon ECS allows developers to have direct, fine-grained control over all infrastructure components,
allowing for the creation of custom application architectures. Additionally, Amazon ECS supports
different deployment strategies to update your application container images.
Capability Description
9
Overview of Deployment Options on AWS AWS Whitepaper
Amazon Elastic Kubernetes Service
Capability Description
Refer to Service Auto Scaling for more details on
configuring auto scaling for your containerized
applications on Amazon ECS.
The following diagram illustrates Amazon ECS being used to manage a simple containerized application.
In this example, infrastructure components are created outside of Amazon ECS, and Amazon ECS is used
to manage the deployment and operation of application containers on the cluster
Amazon EKS also integrates with AWS App Mesh and provides a Kubernetes-native experience to
consume service mesh features and bring rich observability, traffic controls and security features to
applications. Amazon EKS provides a scalable, highly-available control plane for Kubernetes workloads.
When running applications on Amazon EKS, as with Amazon ECS, you can choose to provide the
underlying compute power for your containers with EC2 instances or with AWS Fargate.
10
Overview of Deployment Options on AWS AWS Whitepaper
Amazon Elastic Kubernetes Service
Capability Description
Amazon EKS allows organizations to leverage open source Kubernetes tools and plugins, and can be a
good choice for organizations migrating to AWS with existing Kubernetes environments. The following
diagram illustrates Amazon EKS being used to manage a general containerized application.
11
Overview of Deployment Options on AWS AWS Whitepaper
AWS OpsWorks
AWS OpsWorks
AWS OpsWorks is a configuration management service that enables customers to construct, manage,
and operate a wide variety of application architectures, from simple web applications to highly complex
custom applications. Organizations deploying applications with OpsWorks use the automation platforms
Chef or Puppet to manage key operational activities like server provisioning, software configurations,
package installations, database setups, scaling, and code deployments. There are three ways to use
OpsWorks:
• AWS OpsWorks for Chef Automate: fully managed configuration management service that hosts Chef
Automate.
• AWS OpsWorks for Puppet Enterprise: fully managed configuration management service that hosts
Puppet Enterprise.
• AWS OpsWorks Stacks: application and server management service that supports modeling
applications using the abstractions of “stacks” and “layers” that depend on Chef recipes for
configuration management.
With OpsWorks for Chef Automate and OpsWorks for Puppet Enterprise, AWS creates a fully managed
instance of Chef or Puppet running on Amazon EC2. This instance manages configuration, deployment,
and monitoring of nodes in your environment that are registered to the instance. When using OpsWorks
with Chef Automate or Puppet Enterprise, additional services (e.g., CloudFormation) may need to be
used to create and manage infrastructure components that are not supported by OpsWorks.
OpsWorks Stacks provides a simple and flexible way to create and manage application infrastructure.
When working with OpsWorks Stacks, you model your application as a “stack” containing different
“layers.” A layer contains infrastructure components necessary to support a particular application
function, such as load balancers, databases, or application servers. OpsWorks Stacks does not require the
creation of a Chef server, but uses Chef recipes for each layer to handle tasks such as installing packages
on instances, deploying applications, and managing other resource configurations. OpsWorks Stacks will
create and provision infrastructure on your behalf, but does not support all AWS services.
12
Overview of Deployment Options on AWS AWS Whitepaper
AWS OpsWorks
Provided that a node is network reachable from an OpsWorks Puppet or Chef instance, any node can be
registered with the OpsWorks, making this solution a good choice for organizations already using Chef or
Puppet and working in a hybrid environment. With OpsWorks Stacks, an on-premises node must be able
to communicate with public AWS endpoints.
Capability Description
OpsWorks provides a complete, flexible, and automated solution that works with existing and popular
tools while allowing application owners to maintain full-stack control of an application. The following
example shows a typical use case for AWS OpsWorks Stacks as it is used to create and manage a three-
tier web application.
13
Overview of Deployment Options on AWS AWS Whitepaper
Additional Deployment Services
This next example shows a typical use case for AWS OpsWorks for Chef Automate or Puppet Enterprise
as it is used to manage the compute instances of a web application.
Figure 7: AWS OpsWorks with Chef Automate or Puppet Enterprise use case
14
Overview of Deployment Options on AWS AWS Whitepaper
Prebaking vs. Bootstrapping AMIs
Deployment Strategies
In addition to selecting the right tools to update your application code and supporting infrastructure,
implementing the right deployment processes is a critical part of a complete, well-functioning
deployment solution. The deployment processes that you choose to update your application can depend
on your desired balance of control, speed, cost, risk tolerance, and other factors.
Each AWS deployment service supports a number of deployment strategies. This section will provide an
overview of general-purpose deployment strategies that can be used with your deployment solution.
An Amazon Machine Image (AMI) provides the information required to launch an instance (operating
systems, storage volumes, permissions, software packages, etc.). You can launch multiple, identical
instances from a single AMI. Whenever an EC2 instance is launched, you select the AMI that is to be used
as a template. Prebaking is the process of embedding a significant portion of your application artifacts
within an AMI.
Prebaking application components into an AMI can speed up the time to launch and operationalize an
Amazon EC2 instance. Prebaking and bootstrapping practices can be combined during the deployment
process to quickly create new instances that are customized to the current environment.
Refer to Best practices for building AMIs for more details on creating optimized AMIs for your
application.
Blue/Green Deployments
A blue/green deployment is a deployment strategy in which you create two separate, but identical
environments. One environment (blue) is running the current application version and one environment
(green) is running the new application version. Using a blue/green deployment strategy increases
application availability and reduces deployment risk by simplifying the rollback process if a deployment
fails. Once testing has been completed on the green environment, live application traffic is directed to
the green environment and the blue environment is deprecated.
A number of AWS deployment services support blue/green deployment strategies including Elastic
Beanstalk, OpsWorks, CloudFormation, CodeDeploy, and Amazon ECS. Refer to Blue/Green Deployments
on AWS for more details and strategies for implementing blue/green deployment processes for your
application.
Rolling Deployments
A rolling deployment is a deployment strategy that slowly replaces previous versions of an application
with new versions of an application by completely replacing the infrastructure on which the application
15
Overview of Deployment Options on AWS AWS Whitepaper
In-Place Deployments
is running. For example, in a rolling deployment in Amazon ECS, containers running previous versions of
the application will be replaced one-by-one with containers running new versions of the application.
A rolling deployment is generally faster to than a blue/green deployment; however, unlike a blue/
green deployment, in a rolling deployment there is no environment isolation between the old and new
application versions. This allows rolling deployments to complete more quickly, but also increases risks
and complicates the process of rollback if a deployment fails.
Rolling deployment strategies can be used with most deployment solutions. Refer to CloudFormation
Update Policies for more information on rolling deployments with CloudFormation; Rolling Updates
with Amazon ECS for more details on rolling deployments with Amazon ECS; Elastic Beanstalk Rolling
Environment Configuration Updates for more details on rolling deployments with Elastic Beanstalk; and
Using a Rolling Deployment in AWS OpsWorks for more details on rolling deployments with OpsWorks.
In-Place Deployments
An in-place deployment is a deployment strategy that updates the application version without replacing
any infrastructure components. In an in-place deployment, the previous version of the application
on each compute resource is stopped, the latest application is installed, and the new version of the
application is started and validated. This allows application deployments to proceed with minimal
disturbance to underlying infrastructure.
An in-place deployment allows you to deploy your application without creating new infrastructure;
however, the availability of your application can be affected during these deployments. This approach
also minimizes infrastructure costs and management overhead associated with creating new resources.
Refer to Overview of an In-Place Deployment for more details on using in-place deployment strategies
with CodeDeploy.
A common pattern for applications on AWS is to use CloudFormation (and its extensions) to manage
general-purpose infrastructure, and use a more specialized deployment solution for managing
application updates. In the case of a containerized application, CloudFormation could be used to create
the application infrastructure, and Amazon ECS and Amazon EKS could be used to provision, deploy, and
monitor containers.
AWS deployment services can also be combined with third-party deployment services. This allows
organizations to easily integrate AWS deployment services into their existing CI/CD pipelines or
infrastructure management solutions. For example, OpsWorks can be used to synchronize configurations
between on-premises and AWS nodes, and CodeDeploy can be used with a number of third-party CI/CD
services as part of a complete pipeline.
16
Overview of Deployment Options on AWS AWS Whitepaper
Conclusion
AWS provides number of tools to simplify and automate the provisioning of infrastructure and
deployment of applications; each deployment service offers different capabilities for managing
applications. To build a successful deployment architecture, evaluate the available features of each
service against the needs your application and your organization.
17
Overview of Deployment Options on AWS AWS Whitepaper
Contributors
Contributors to this document include:
18
Overview of Deployment Options on AWS AWS Whitepaper
Further Reading
For additional information, see:
19
Overview of Deployment Options on AWS AWS Whitepaper
Document Revisions
To be notified about updates to this whitepaper, subscribe to the RSS feed.
Whitepaper updated (p. 20) Updated with latest services and June 3, 2020
features.
20
Overview of Deployment Options on AWS AWS Whitepaper
Notices
Customers are responsible for making their own independent assessment of the information in this
document. This document: (a) is for informational purposes only, (b) represents current AWS product
offerings and practices, which are subject to change without notice, and (c) does not create any
commitments or assurances from AWS and its affiliates, suppliers or licensors. AWS products or services
are provided “as is” without warranties, representations, or conditions of any kind, whether express or
implied. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements,
and this document is not part of, nor does it modify, any agreement between AWS and its customers.
© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved.
21