Hands-on Labs¶
CloudFormation-based reproduction environments for each troubleshooting scenario.
flowchart TD
A[Hands-on Labs] --> B[Deployment & Availability]
A --> C[Performance]
A --> D[Networking]
B --> B1[Deployment failure]
B --> B2[Health red after deploy]
B --> B3[Immutable rollback]
B --> B4[Environment launch failed]
C --> C1[High latency]
C --> C2[CPU and memory exhaustion]
C --> C3[Instance degraded health]
D --> D1[Load balancer 5xx]
D --> D2[VPC connectivity]
D --> D3[HTTPS termination] How Labs Work¶
template.yaml— CloudFormation templateapp/— Application code to reproduce symptomtrigger.sh— Script to trigger the symptomverify.sh— Script to verify signals- Documentation page
Available Labs¶
Deployment & Availability¶
| Lab | Symptom | Related Playbook |
|---|---|---|
| Deployment Failure | Application version deploy fails and EB rolls back | Deployment Failed and Environment Rolled Back |
| Health Red After Deploy | Deploy completes but environment turns Severe or Degraded | Health Turns Red After Successful Deploy |
| Immutable Update Rollback | Immutable deployment cannot promote replacement batch | Immutable Update Rolled Back |
| Environment Launch Failed | New environment cannot finish launch workflow | Environment Launch Failed |
Performance¶
| Lab | Symptom | Related Playbook |
|---|---|---|
| High Latency Under Load | p95 latency rises sharply during load surge | High Latency Under Load |
| CPU and Memory Exhaustion | Sustained saturation causes slow requests and process restarts | CPU and Memory Exhaustion |
| Instance Degraded Health | One or more instances remain Degraded while environment still serves traffic | Instance Degraded Health |
Networking¶
| Lab | Symptom | Related Playbook |
|---|---|---|
| Load Balancer 5xx | ALB returns 502 or 504 while instances appear to run | Load Balancer Returns 5xx Errors |
| VPC Connectivity Issues | EB instances cannot reach dependencies or required endpoints | VPC Connectivity Issues |
| HTTPS Termination Issues | TLS listener, certificate, or redirect path is broken | HTTPS Termination Issues |
Prerequisites¶
- AWS account with permission to create Elastic Beanstalk, CloudFormation, EC2, Auto Scaling, Elastic Load Balancing, IAM, and CloudWatch resources
- AWS CLI configured for the target account and region
- EB CLI installed for application packaging and environment operations
- Bash shell for
trigger.shandverify.sh
General Workflow¶
export LAB_NAME="deployment-failure"
export AWS_REGION="ap-northeast-2"
export STACK_NAME="eb-lab-${LAB_NAME}"
export APP_NAME="eb-lab-${LAB_NAME}"
export ENV_NAME="eb-lab-${LAB_NAME}-env"
aws cloudformation deploy \
--stack-name "$STACK_NAME" \
--template-file "template.yaml" \
--capabilities CAPABILITY_NAMED_IAM \
--region "$AWS_REGION"
eb init "$APP_NAME" \
--platform "Python 3.11 running on 64bit Amazon Linux 2023" \
--region "$AWS_REGION"
eb deploy "$ENV_NAME" --staged
bash "trigger.sh"
bash "verify.sh"
eb events --environment-name "$ENV_NAME" --all
eb logs --environment-name "$ENV_NAME" --all
Warning
These labs intentionally create unhealthy or broken Elastic Beanstalk environments. Stop the lab after collecting evidence. Load balancers, EC2 instances, NAT gateways, and CloudWatch log ingestion can generate cost until you delete the stack and terminate the environment.
See Also¶
Sources¶
- https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/troubleshooting.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html
- https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html