Overview of Deployment Options on AWS Whitepaper (2020)

Deployment solution capabilities:

  • Provision
  • Configure
  • Deploy
  • Scale
  • Monitor

AWS CloudFormation

  • Provisioning and managing almost any AWS resource
  • Uses YAML / JSON
  • Extensions to CloudFormation
    • AWS Cloud Development Kit (AWS CDK) - programmatically model AWS infrastructure with TypeScript, Python, Java, or .NET
    • AWS Serverless Application Model (AWS SAM) - open source framework to simplify building serverless applications on AWS
  • CloudFormation supports package installation on EC2 using AWS::CloudFormation::Init section
  • You may need to use additional deployment service to update the application version running on your infra
  • Monitoring using Stack / Change Set state change, as well as “drift detection” mechanism. Application-level monitoring and metrics require additional mechanism.

AWS Elastic Beanstalk

  • Complete application management solutions, managing all infrastructure and platform tasks
  • Deploy, manage and scale applications
  • Fully provisions all the infrastructure components
  • Handles application deployments
  • Scales the scaling your infra by with managed ASGs
  • Built-in environment monitoring for application including deployment success/failures, environment health, resource performance, and application logs.

AWS CodeDeploy

  • Building block service that is focused on deploying and updating software running on existing infrastructure
  • Intended to be used in conjunction with other services
    • AWS CodeStar, AWS CodePipeline, AWS Developer Tools
  • Does not manage provisioning AWS resources
  • Does not support scaling your underlying infra
  • Monitoring success or failure of deployment
  • Does not offer performance or application-level metrics

Amazon Elastic Container Service

  • Provisions new application container instances and compute resources based on scaling policies and Amazon ECS configurations. Some resources, e.g. ALB will be created outside Amazon ECS.
  • Customization of underlying compute resources is only available if using EC2 instances.
  • Supports customization of the compute resources created to run a containerized application, runtime conditions of the application containers.
  • Supports several deployment strategies.
  • Can be used with autoscaling policies to adjust number of containers in ECS cluster.
  • Supports monitoring compute and application containers with CloudWatch.

Amazon Elastic Kubernetes Service

  • Amazon EKS - fully-managed, certified Kubernetes conformant service
  • Simplifies the process of building, securing, and operating Kubernetes clusters
  • Provisioning certain resources, e.g. Load Balancers, Computer Resources (“workers”), Application Container Instances (“pods”)
  • Supports customization of compute resources if using EC2 instances to supply compute power. Supports customization of the application containers (“pods”).
  • Supports the same deployment strategies as Kubernetes.
  • Scales workers with Kubernetes Cluster Autoscaler, and pods with Kubernetes Horizontal Pod Autoscaler and Kubernetes Vertical Pod Autoscaler.
  • EKS control plane logs provide audit and diagnostic information directly to CloudWatch Logs. Integrates with CloudTrail to record actions taken on AWS EKS.

AWS OpsWorks

  • Uses Chef or Puppet automation platforms
    • AWS OpsWorks for Chef Automate
    • AWS OpsWorks for Puppet Enterprise
    • AWS OpsWorks Stacks
  • AWS OpsWorks Stacks supports provisioning certain AWS services as part of application using chef recipes. With Chef or Puppet flavors of OpsWorks infrastructure must be created elsewhere and registered to the instance.
  • Supports configuration management of registered nodes.
  • Support deployment and update of applications running on registered nodes.
  • OpsWorks Stacks can handle automatically scaling instances based on changes in incoming traffic. (Uses CloudWatch metrics - scaling types: 24/7/, time-based, load-based).
  • Provides features to monitor deployment status. Provides a set of configurable CloudWatch metrics and CloudTrail for full-stack monitoring.

Additional Deployment Services

  • Hosting static websites on AWS
    • Amazon S3 combined with Amazon CloudFront

Deployment Strategies

  • Prebaking vs. Bootstrapping AMIs
    • Prebaking is the process of embedding significant portion of your application artifacts within the AMI. Prebaking can accelerate the scaling time.
    • Bootstrapping is the process of installing your applications, dependencies, or customization when EC2 instance is launched
  • Blue/Green Deployments
    • Increases application availability and reduces deployment risk by simplifying the rollback process.
  • Rolling Deployments
    • E.g. replacing containers one-by-one
  • In-Place Deployments