Configuration
Read, update, and manage Elastic Beanstalk environment configuration using the EB CLI.
When to Use
- •View or edit environment configuration
- •Set or view environment variables
- •Scale instances
- •Save/apply configuration templates
- •Manage environment tags
- •Configure HTTPS, scaling, instance type, enhanced health
When NOT to Use
- •Creating environments → use
environmentskill - •SSL certificate management → use
eb-infraskill - •Deploying code → use
deployskill - •Secrets Manager / SSM → use
eb-infraskill
Interactive Config Editor
bash
eb config eb config <env-name>
Environment Variables
bash
eb printenv # View eb printenv <env-name> # View specific env eb setenv KEY1=value1 KEY2=value2 # Set eb setenv KEY1= # Remove
Quick Scale
bash
eb scale <number> eb scale <number> <env-name>
Save/Apply Configuration Templates
bash
eb config save --cfg <config-name> # Save eb config --cfg <config-name> # Apply
Validate Configuration Before Applying
bash
aws elasticbeanstalk validate-configuration-settings \ --application-name <app-name> \ --environment-name <env-name> \ --option-settings file://options.json \ --output json
Tag Management
bash
eb tags --list # List tags eb tags --add "Team=backend,Env=prod" # Add eb tags --update "Env=staging" # Update eb tags --delete "OldTag" # Delete
Common Configuration Tasks
HTTPS listener:
yaml
aws:elbv2:listener:443: ListenerEnabled: 'true' Protocol: HTTPS SSLCertificateArns: arn:aws:acm:region:account:certificate/cert-id
Scaling:
yaml
aws:autoscaling:asg: MinSize: '2' MaxSize: '10' aws:autoscaling:trigger: MeasureName: CPUUtilization UpperThreshold: '70'
Instance type:
yaml
aws:autoscaling:launchconfiguration: InstanceType: t3.medium
Enhanced health:
yaml
aws:elasticbeanstalk:healthreporting:system: SystemType: enhanced
Platform Gotchas
AL2023/AL2 Node.js: The aws:elasticbeanstalk:container:nodejs namespace (NodeCommand, NodeVersion, etc.) is NOT supported on Amazon Linux 2 or AL2023. It only works on legacy Amazon Linux 1 (AMI). On AL2/AL2023, use a Procfile instead:
code
# Procfile web: node app.js
Composability
- •Deploy after config change: Use
deployskill - •Check status: Use
statusskill - •Create new environment: Use
environmentskill - •SSL/secrets/database config: Use
eb-infraskill