Elastic Beanstalk Flashcards
This deck aims to help retain concepts related to the Elastic Beanstalk service.
What AWS service allows developers to deploy and manage applications without handling the underlying infrastructure, automatically managing provisioning, load balancing, scaling, and health monitoring?
AWS Elastic Beanstalk
What AWS services does Elastic Beanstalk use under the hood to manage application deployments?
- EC2, ECS
- ELB, Auto Scaling
- RDS, S3
- SQS
- CloudWatch
- IAM
and more
In AWS Elastic Beanstalk, what component defines the underlying technology stack used to run the application?
Platform
How is AWS Elastic Beanstalk billed?
Elastic Beanstalk is free of charge, but you charged for the underlying AWS resources it provisions, such as EC2, ELB, RDS, S3, and CloudWatch
What platforms does AWS Elastic Beanstalk support for deploying applications?
- Go
- Node.js
- PHP
- Python
- Ruby
- Java SE, Tomcat (Java SE runtime)
- .NET Core on Linux
- .NET on Windows Server
- Docker
- Single Container (EC2 instance)
- Multi-Container (ECS cluster)
- Preconfigured Docker (custom runtimes)
What file format are supported for an AWS Elastic Beanstalk source bundle?
ZIP and WAR
What is the maximum allowed size for an AWS Elastic Beanstalk source bundle?
500 MB
Can an AWS Elastic Beanstalk source bundle contain a top-level (parent) directory?
No, but it can contain subdirectories
Which AWS service does AWS Elastic Beanstalk use to manage infrastructure?
AWS CloudFormation
What AWS Elastic Beanstalk component represents a specific version of deployable code for an application?
Application Version
What AWS Elastic Beanstalk component represents a top-level architecture block that can contain multiple environments?
Application
What AWS Elastic Beanstalk component represents a container for infrastructure and configuration for a specific application version?
Environment, each having its own CNAME
What AWS Elastic Beanstalk feature allows to swap the CNAMEs of two environments?
CNAME Swap (switchover feature)
What AWS Elastic Beanstalk component defines the structure and function of an environment?
Environment Tiers
What types of environment tiers are supported in AWS Elastic Beanstalk?
- Web Server Environment Tier: applications that handle HTTP requests
- Worker Environment Tier: backend applications that pull tasks from an SQS queue
What are some ideal use cases for AWS Elastic Beanstalk?
- Small development teams without dedicated operations staff
- Simple projects with minimal infrastructure complexity
- Rapid prototyping or MVPs
Is it recommended to run a database within an AWS Elastic Beanstalk environment?
No, databases should be provisioned and managed outside of Elastic Beanstalk, typically using AWS RDS or other database services
What AWS Elastic Beanstalk platform should be used if the platform required by the application code is not directly supported?
Docker, as it allows for custom runtimes
What configuration file is required for deploying to AWS Elastic Beanstalk Single Container platform?
One of the following:
- Dockerfile: to build a Docker image and runs the container
- Dockerrun.aws.json (v1): to use existing image and configure ports, volumes, and environment variables
- docker-compose.yml: if Docker Compose is required for deployment
What configuration file is required for deploying to AWS Elastic Beanstalk Multi-Container platform?
Dockerrun.aws.json (v2): to defines multiple container configurations, including images, ports, volumes, environment variables, and ECS task definitions
What AWS Elastic Beanstalk feature controls how application versions are deployed to an environment?
Deployment Strategies (Policies)
What deployment strategies does AWS Elastic Beanstalk provide?
- All-at-once
- Rolling
- Rolling with additional batch
- Immutable
- Traffic Splitting
Which AWS Elastic Beanstalk deployment strategy performs an in-place deployment on all instances, causing a brief outage and is commonly used for development and test environments?
All-at-once
Which AWS Elastic Beanstalk deployment strategy divides instances into batches and deploys to one batch at a time, causing a temporary loss in capacity but no additional cost?
Rolling (batch size can be configured)
Which AWS Elastic Beanstalk deployment strategy deploys updates in batches but creates new EC2 instances for the first batch instead of using existing ones, preventing capacity loss at the cost of increased resource usage?
Rolling with additional batch
Which AWS Elastic Beanstalk deployment strategy provisions new instances for deployment instead of updating existing ones, providing the safest rollback option?
Immutable
Which AWS Elastic Beanstalk deployment strategy enables immutable deployment while gradually shifting traffic to new instances, providing flexibility for testing, and incurring increased costs?
Traffic splitting
What are the two types of AWS RDS integration supported by AWS Elastic Beanstalk?
- RDS within EB Environment: Linked to a single Environment
- RDS outside of EB Environment: Can be used by multiple Environments
What considerations should be taken into account when using AWS RDS linked to AWS Elastic Beanstalk Environment?
- If the environment is deleted, RDS is deleted too
- Different environments have different databases and data
- Environment properties (RDS_*) are automatically created and provided to all applications within the environment
- Typically used for small-scale development and test environments
What considerations should be taken into account when using AWS RDS outside of AWS Elastic Beanstalk?
- Multiple EB Environments can use the same RDS instance
- The data layer is outside the Environment, so if the environment is deleted, data remains untouched
- Environment properties (RDS_*) must be created manually
What directory in the application source code contains configuration files for customizing the AWS Elastic Beanstalk environment and its resources?
The .ebextensions/
directory contains *.config
files in YAML or JSON format for environment configuration
What section of an .ebextensions/*.config
file in AWS Elastic Beanstalk is used to define configuration option values?
option_settings
What section of an .ebextensions/*.config
file in AWS Elastic Beanstalk is used to define additional AWS resources beyond the functionality provided by configuration options?
Resources
What sections of an .ebextensions/*.config
file in AWS Elastic Beanstalk allow configuring the EC2 instances launched in the environment?
packages
sources
files
users
groups
commands
container_commands
services
What configuration file can be placed in the root directory of the source bundle to define settings such as EnvironmentName
, EnvironmentLinks
, EnvironmentTier
, Platform
, SolutionStack
, OptionSettings
, Tags
, and CName
when creating an AWS Elastic Beanstalk environment?
env.yaml
What actions are required to enable HTTPS for an AWS Elastic Beanstalk environment?
An SSL certificate must be applied to the ELB via the EB Console or configured using .ebextensions
, additionally, security group rules must allow inbound traffic on port 443
Which AWS Elastic Beanstalk feature allows creating a new environment by duplicating an existing one, including its configuration and associated AWS resources?
Cloning
What considerations should be taken into account when using the AWS Elastic Beanstalk clone feature?
- Option settings, environment variables, and other settings are copied
- Data from RDS to clone is not copied
- Any unmanaged changes to resources are not included
- Security groups for ingress are considered unmanaged changes
*Changes to AWS resources that applied using tools other than the Elastic Beanstalk console, command-line tools, or API are considered unmanaged changes
What CLI command is used to utilize the AWS Elastic Beanstalk clone feature?
$ eb clone <environment-name>
What are the primary use cases for the AWS Elastic Beanstalk clone feature?
- Create a new environment by cloning an existing one
- Copy an environment for Q/A testing or other use cases
Can you use the AWS Elastic Beanstalk clone feature to clone an environment to a different platform branch?
No, the environment can only be cloned to a different platform version of the same platform branch
When creating a custom platform in AWS Elastic Beanstalk using a Packer template, which parameters must be specified in the custom_platform.json
file?
source_ami
region
What happens to instances managed by AWS Elastic Beanstalk that are terminated due to failed deployments?
Elastic Beanstalk automatically replaces the failed instances with new instances running the application version from the most recent successful deployment
Which file must be included in the source bundle when deploying a worker application for periodic background tasks in Elastic Beanstalk?
cron.yaml
How can you migrate an Elastic Beanstalk environment between AWS accounts?
By using saved configurations, which are YAML formatted templates that define an environment’s platform version, tier, and configuration settings, and can be applied to new or running environments