Please enable JavaScript.
Coggle requires JavaScript to display documents.
AWS Compute: Lightsail & Elastic Beanstalk - Coggle Diagram
AWS Compute: Lightsail & Elastic Beanstalk
Lightsail
= virtual private server (VPS)
= a virtual machine, SSD-based storage, data transfer, DNS management, and a static IP
comes with a selection of images with OSes, popular tools (WordPress, Drupal, Magento,...) and development stacks (LAMP, MEAN, LEMP, Node.js, Django and GitLab)
can add EBS
can add Lightsail load balancer (with SSL/TLS)
can peer VPC so that Lightsail instances can use other AWS resources outside of Lightsail
Elastic Beanstalk
concepts
application
source bundle = 1 ZIP or WAR (multiple WARs in ZIP is ok), max. 512MB, no parent folder or top-level directory
= logical collection of Elastic Beanstalk components, including environments, versions, and environment configurations
application version
application version lifecycle policy
= a specific, labeled iteration of deployable code for a web application
by default, Elastic Beanstalk leaves the application version's source bundle in Amazon S3 to prevent loss of data
environment
= a collection of AWS resources running an application version
create and manage separate environments for development, testing, and production
deployment
all at once (default) = quickest but downtime
rolling = avoids downtime and minimizes reduced availability, at a cost of a longer deployment time
rolling with additional batch = avoids any reduced availability, at a cost of an even longer deployment time compared to the Rolling method
immutable = slower deployment method, that ensures new application version is always deployed to new instances, instead of updating existing instances, also has the additional advantage of a quick and safe rollback in case the deployment fails
traffic splitting = canary testing deployment method, suitable if you want to test the health of your new application version using a portion of incoming traffic, while keeping the rest of the traffic served by the old application version
you can setup blue/green deployment yourself BUT environment must run independently of production database (so RDS not managed/created by Elastic Beanstalk!!!) = clone environment or setup new one (eg. new platform version), deploy new application version and then swap environment URLs
configuration changes
are applied independent of deployments
some changes can be applied without replacing existing instances (eg. health checks on ELB)
changes that modify the launch configuration or VPC settings require terminating all instances in your environment and replacing them
rolling updates = configuration changes applied in batches
immutable updates = temporary Auto Scaling group launched outside of your environment with a separate set of instances running with the new configuration, ASG placed behind ELB, old and new serve traffic until health checks new OK, then new instances moved in environment ASG and temporary ASG and old instances terminated
disabled = terminate existing instances and replace them with new instances running with the new configuration
notifications with SNS
environment tier
= designates type of application the environment runs, and determines what resources Beanstalk provisions to support it
web server environment tier
1 ELB, an Auto Scaling group, and one or more Amazon EC2 instances
host manager (HM) runs on each Amazon EC2 instance
worker environment tier
an Auto Scaling group, one or more Amazon EC2 instances, an IAM role and an Amazon SQS queue
environment configuration
= identifies a collection of parameters and settings that define how an environment and its associated resources behave
resources
EC2
instance security group
ELB =
dedicated
to environment or
shared
across environments (shared only supported by ALB)
ELB security group
Auto Scaling Group
S3 bucket = storage location for source code, logs, and other artifacts
CloudWatch alarms = 2 alarms that monitor the load on the instances in the environment and that are triggered if the load is too high or too low. When an alarm is triggered, ASG scales up or down in response
CloudFormation stack
domain name (subdomain.region.elasticbeanstalk.com)
RDS (but: for production recommended to setup RDS outside of Elastic Beanstalk)
saved configuration = a template that you can use as a starting point for creating unique environment configurations
platform
= a combination of an operating system, programming language runtime, web server, application server, and Elastic Beanstalk components
supported platforms
Docker
multicontainer Docker (uses ECS)
preconfigured Docker
Go
Java SE
Tomcat
.NET Core on Linux
.NET on Windows Server
Node.js
PHP
Python
Ruby
platform updates = managed (when minor upgrade within same platform) or blue/green (when major upgrade within same platform or migration to other platform)
permissions
service role = IAM role that Elastic Beanstalk assumes when calling other services on your behalf (AWSElasticBeanstalkEnhancedHealth)
instance profile = IAM role that is applied to instances launched in Elastic Beanstalk environment (AWSElasticBeanstalkWebTier, AWSElasticBeanstalkWorkerTier, AWSElasticBeanstalkMulticontainerDocker)
user policy = create IAM users for each person who uses Elastic Beanstalk to avoid using your root account or sharing credentials, only grant these users permission to access services and features that they need