Use a golden AMI: Install your applications, OS dependencies, etc. beforehand and launch your EC2 instance from the Golden AMI
Bootstrap using User Data: For dynamic configuration, use User Data scripts
Hybrid: Mix Golden AMI and User Data (Elastic Beanstalk)
For RDS Databases, restore from a snapshot. The DB will have schemas and data ready
For EBS Volumes, restore from a snapshot. The disk will already be formatted and have data
Elastic Beanstalk
Elastic Beanstalk is a managed service that automatically handles capacity provisioning, load balancing, scaling, application health monitoring and instance configuration
The developer is only responsible for the application code and configuration
Beanstalk itself is free, but you pay for the underlying instances
Components:
Application (collection of Beanstalk components (environments, versions, configurations, etc.))
Application Version
Environment
Collection of AWS resources running an application version (only one application version at a time)
Tiers: Web Server Environment Tier (ELB to ASG with EC2 instances) & Worker Environment Tier (SQS queue to ASG with EC2 instances)
You can create multiple environments (dev, test, prod)
Supported Platforms:
Go
Java SE & Java with Tomcat
.NET Core on Linux or .NET on Windows Server
Node.js
PHP
Python
Ruby
Packer Builder
Docker (single container, multi-container or pre-configured)
Deployment Modes:
Single Instance (great for dev environments)
High Availability with Load Balancer (great for prod environments)