AWS Certified DevOps Engineer Notes
Elastic Beanstalk is a developer centric view of deploying application on AWS.
.ebextensions/
directory in the root of source code.config
extensions (example: logging.config
).ebextensions
get deleted if the environment goes away.ebextensions
folder goes to the root of our project.ebextensions
to provision basically anything we wantDockerrun.aws.json
(v1): describe where the Docker image should be downloaded from (DockerHub, ECR, etc.)Dockerrun.aws.json
(V2) in the root of the source code
Dockerrun.aws.json
is used to generate the ECS task definitionconfig .ebextensions
/securelistener-alb.config
To install run:
pip install awsebcli --upgrade --user
Initialize an Elastic Beanstalk project:
eb init
Initialize Elastic Beanstalk environments:
eb create dev-env
Open the application from a web browser:
eb open
Other useful CLI commands:
eb status
: shows the health of the environmenteb health (--refresh)
: displays the health of the applicationeb logs
eb deploy
:eb terminate
: terminate stackBack up current configurations from environment:
eb config save env --cfg <initial-configuration>
Set an environment variable on the selected EB environment:
eb setenv PORT=8080
Update existing saved configuration
eb config put <config-name>
Apply configuration to environment:
eb config <environment-name> --cfg <config-name>
.config
.config
templates in the .ebextensions
folder.ebextensions
Container Commands.ebextensions
filescommands
: the commands run before the application and web server are set up and the application version file is extractedcontainer_commands
:
leader_only
flag: can be used if we want the command to be executed by a single EB instancecron.yml
: configuration file for the worker environment for being able to create cron jobsDockerrun.aws.json
: EB specific json file describing how to deploy a set of Docker containers as an Elastic Beanstalk application