From aws-beanstalk
Provides Elastic Beanstalk documentation, best practices, platform-specific guidance, and reference information for all 8 supported platforms. Use when user says "how do I", "beanstalk docs", "eb documentation", "beanstalk help", or needs platform guidance, .ebextensions examples, or .platform directory structure. For EB CLI operations use the dedicated skills. For AWS infrastructure use eb-infra skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aws-beanstalk:eb-docsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Provide documentation, best practices, and reference information for Elastic Beanstalk using the EB CLI.
Provide documentation, best practices, and reference information for Elastic Beanstalk using the EB CLI.
deploy, status, logs, config, environment, app, maintenance)troubleshoot skilleb-infra skillpip install awsebcli
# or
brew install awsebcli
eb --version
eb init
| Command | Description |
|---|---|
eb init | Initialize EB project |
eb create | Create new environment |
eb deploy | Deploy application |
eb status | Show environment status |
eb health | Show health status |
eb logs | Get logs |
eb config | Edit configuration |
eb terminate | Terminate environment |
eb list | List environments |
eb use | Set default environment |
eb open | Open in browser |
eb events | Show recent events |
eb ssh | SSH to instance |
eb scale | Scale instances |
eb setenv | Set environment variables |
eb printenv | Show environment variables |
eb upgrade | Upgrade platform |
eb clone | Clone environment |
eb swap | Swap environment URLs |
eb abort | Abort in-progress update |
eb restore | Restore terminated env |
eb appversion | Manage app versions |
eb platform | Platform operations |
eb console | Open AWS Console |
eb tags | Manage environment tags |
eb restart | Restart app server |
eb codesource | Configure CodeCommit integration |
eb local | Run Docker app locally |
eb labs | Experimental features |
eb migrate | Migrate IIS apps to EB (Windows) |
For full platform details (all 8 platforms including configuration, examples, and comparison), see the Platforms Reference.
Project Structure:
├── package.json # Required: dependencies & scripts
├── .npmrc # Optional: npm configuration
├── Procfile # Optional: custom start command
├── .ebignore # Optional: files to exclude
└── .ebextensions/ # Optional: EB configuration
Key Settings:
- NODE_ENV=production
- npm start should work
- Listen on process.env.PORT (default: 8080)
Project Structure:
├── requirements.txt # Required: pip dependencies
├── application.py # WSGI application
├── Procfile # Optional: custom command
├── .ebignore # Optional: files to exclude
└── .ebextensions/ # Optional: EB configuration
Key Settings:
- WSGIPath: application:application
- NumProcesses, NumThreads for scaling
Project Structure:
├── target/app.war # WAR file (Tomcat)
├── target/app.jar # JAR file (standalone)
├── Procfile # For JAR: web: java -jar app.jar
└── .ebextensions/ # Optional: EB configuration
Key Settings:
- JVM options via JAVA_OPTS
- Heap size configuration
Project Structure:
├── Dockerfile # Required for single container
├── docker-compose.yml # For multi-container
├── .dockerignore # Exclude files from build
└── .ebextensions/ # Optional: EB configuration
Key Settings:
- Expose port 80 or configure proxy
- Use multi-stage builds for smaller images
On Amazon Linux 2 and AL2023, use .platform/ for hooks and reverse proxy customization:
.platform/
├── hooks/ # Run during deployments & platform updates
│ ├── prebuild/ # Before app build (install dependencies)
│ ├── predeploy/ # After build, before app deploy
│ └── postdeploy/ # After app deploy completes
├── confighooks/ # Run only on configuration changes
│ ├── prebuild/
│ ├── predeploy/
│ └── postdeploy/
└── nginx/
├── conf.d/ # Additional nginx config (*.conf)
└── nginx.conf # Full nginx config (replaces default)
Hook scripts must be executable (chmod +x). They run as root.
# .platform/hooks/postdeploy/01_restart_service.sh
#!/bin/bash
systemctl restart my-service
# .platform/nginx/conf.d/client_max_body.conf
client_max_body_size 50M;
Note: .ebextensions/ still works on AL2/AL2023 for option_settings and resources, but prefer .platform/hooks/ over .ebextensions/ commands/container_commands for lifecycle scripts.
# .ebextensions/env.config
option_settings:
aws:elasticbeanstalk:application:environment:
NODE_ENV: production
LOG_LEVEL: info
# .ebextensions/packages.config
packages:
yum:
gcc: []
make: []
# .ebextensions/commands.config
commands:
01_create_dir:
command: mkdir -p /var/app/logs
ignoreErrors: true
# .ebextensions/files.config
files:
"/etc/nginx/conf.d/proxy.conf":
mode: "000644"
owner: root
group: root
content: |
client_max_body_size 20M;
Create .ebignore to exclude files from deployment:
# Dependencies
node_modules/
.venv/
__pycache__/
# Build artifacts
dist/
build/
*.pyc
# Local config
.env
.env.local
# IDE
.idea/
.vscode/
# Git
.git/
Experimental features that may change or be removed in future versions:
eb labs --help # List available lab commands
Warning: Do not rely on eb labs commands for production workflows.
Migrates IIS sites from Windows servers to Elastic Beanstalk:
eb migrate --interactive # Interactive migration
eb migrate --sites "Default Web Site" --archive-only # Archive without deploy
eb migrate explore --verbose # List available IIS sites
eb migrate cleanup # Clean up migration artifacts
Requires IIS 7.0+, Web Deploy 3.6+, and admin privileges. Windows only.
eb setenv for configuration"Environment health has transitioned from Ok to Severe"
eb health # Check health details
eb logs # View application logs
eb events # Check recent events
"Deployment failed"
eb events # Check deployment errors
eb logs --all # Get detailed logs
"502 Bad Gateway"
"High latency warnings"
eb health --refresh # Monitor metrics
eb scale 3 # Add more instances
When providing documentation:
Example:
To set environment variables in Elastic Beanstalk:
1. Via EB CLI (recommended):
eb setenv NODE_ENV=production API_KEY=secret
2. Via .ebextensions (committed to repo):
# .ebextensions/env.config
option_settings:
aws:elasticbeanstalk:application:environment:
NODE_ENV: production
3. View current variables:
eb printenv
Best Practice: Use Secrets Manager for sensitive values.
See: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-softwaresettings.html
deploy skillstatus skilllogs skillconfig skilltroubleshoot skillenvironment skillapp skillmaintenance skilleb-infra skillFor detailed reference information, see the shared reference files:
npx claudepluginhub shinmc/aws-beanstalk-skills --plugin aws-beanstalkDeploys and operates containerized workloads on AWS ECS, Fargate, and ECR. Covers task definitions, services, debugging with ECS Exec, scaling, load balancers, and image management for AWS container optimization.
Generates deployment configurations for hosting providers like Vercel, Railway, AWS, covering env vars, domains, SSL, strategies, rollback plans, and health checks. Useful for production deploys.
Researches infrastructure best practices and generates Terraform modules, Dockerfiles, Kubernetes manifests, Pulumi programs, and CI/CD pipelines for GCP, AWS, Azure deployments.