From aws-beanstalk
Manages AWS infrastructure supporting Elastic Beanstalk — SSL certificates, custom domains, secrets, database monitoring, security auditing, CloudWatch alarms, and cost analysis. Use when user asks about SSL, HTTPS, certificates, custom domains, DNS, Route 53, secrets, API keys, parameter store, RDS, security groups, IAM roles, CloudWatch, monitoring, costs, or billing. For EB CLI operations use the dedicated skills.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aws-beanstalk:eb-infraThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage AWS services that support Elastic Beanstalk environments — SSL certificates, custom domains, secrets, databases, security, monitoring, and costs.
Manage AWS services that support Elastic Beanstalk environments — SSL certificates, custom domains, secrets, databases, security, monitoring, and costs.
environment skilltroubleshoot skillmaintenance skillAWS CLI must be installed and configured:
aws --version
aws configure
aws acm list-certificates --output table
aws acm request-certificate \
--domain-name example.com \
--validation-method DNS \
--subject-alternative-names "*.example.com" \
--output json
aws acm describe-certificate --certificate-arn <arn> --output json
aws acm describe-certificate \
--certificate-arn <arn> \
--query 'Certificate.DomainValidationOptions[*].ResourceRecord' \
--output table
Add these CNAME records to DNS (see Domains section below).
After certificate is issued, edit via eb config (use eb skill):
aws:elbv2:listener:443:
ListenerEnabled: 'true'
Protocol: HTTPS
SSLCertificateArns: <certificate-arn>
aws acm delete-certificate --certificate-arn <arn> --output json
Cannot delete if in use by a load balancer — remove from EB config first.
aws route53 list-hosted-zones --output table
aws route53 list-resource-record-sets --hosted-zone-id <zone-id> --output table
aws route53 change-resource-record-sets \
--hosted-zone-id <zone-id> \
--change-batch '{
"Changes": [{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "app.example.com",
"Type": "CNAME",
"TTL": 300,
"ResourceRecords": [{"Value": "<env-name>.us-east-1.elasticbeanstalk.com"}]
}
}]
}'
aws route53 change-resource-record-sets \
--hosted-zone-id <zone-id> \
--change-batch '{
"Changes": [{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "example.com",
"Type": "A",
"AliasTarget": {
"HostedZoneId": "<eb-region-hosted-zone-id>",
"DNSName": "<env-name>.us-east-1.elasticbeanstalk.com",
"EvaluateTargetHealth": true
}
}
}]
}'
EB Hosted Zone IDs by region:
For the full list, see AWS Elastic Beanstalk endpoints.
aws route53 get-change --id <change-id> --output json
Use Action: "DELETE" with exact same record values.
Security: Avoid passing secret values directly on the command line — they are visible in shell history and process listings. Prefer
--secret-string file://secret.txtwhere the file contains only the secret value.
# Create
aws secretsmanager create-secret \
--name myapp/api-key \
--secret-string file://secret.txt --output json
# Retrieve
aws secretsmanager get-secret-value --secret-id myapp/api-key --output json
# List
aws secretsmanager list-secrets --output table
# Update
aws secretsmanager update-secret \
--secret-id myapp/api-key \
--secret-string file://secret.txt --output json
# Rotate
aws secretsmanager rotate-secret --secret-id myapp/api-key --output json
# Delete (with 7-day recovery)
aws secretsmanager delete-secret \
--secret-id myapp/api-key \
--recovery-window-in-days 7 --output json
Security: Avoid passing secret values directly on the command line — they are visible in shell history and process listings. Prefer
--value file://secret.txtwhere the file contains only the secret value.
# Create (encrypted)
aws ssm put-parameter \
--name /myapp/prod/db-url \
--value file://secret.txt \
--type SecureString --output json
# Retrieve
aws ssm get-parameter --name /myapp/prod/db-url --with-decryption --output json
# List by path
aws ssm get-parameters-by-path --path /myapp/prod/ --with-decryption --output table
# Delete
aws ssm delete-parameter --name /myapp/prod/old-key --output json
EB natively resolves secrets at deployment time:
# Secrets Manager
eb setenv DB_PASS='{{resolve:secretsmanager:myapp/db-pass}}'
# SSM Parameter Store
eb setenv API_KEY='{{resolve:ssm-secure:/myapp/prod/api-key}}'
Note: eb printenv shows the reference syntax, not the resolved value. The app receives the actual value at runtime.
This section focuses on monitoring and snapshots. Do NOT create/delete databases via CLI — use AWS Console.
aws rds describe-db-instances \
--query 'DBInstances[*].[DBInstanceIdentifier,DBInstanceStatus,Engine,Endpoint.Address,Endpoint.Port]' \
--output table
aws rds describe-db-instances \
--db-instance-identifier <db-name> \
--query 'DBInstances[0].Endpoint.[Address,Port]' \
--output text
Compare with eb printenv to verify DATABASE_URL matches.
aws rds create-db-snapshot \
--db-instance-identifier <db-name> \
--db-snapshot-identifier pre-deploy-$(date +%Y%m%d-%H%M) --output json
aws rds describe-db-snapshots \
--db-instance-identifier <db-name> \
--query 'DBSnapshots[*].[DBSnapshotIdentifier,Status,SnapshotCreateTime]' \
--output table
aws rds describe-pending-maintenance-actions --output table
aws rds download-db-log-file-portion \
--db-instance-identifier <db-name> \
--log-file-name error/mysql-error-running.log --output text
aws ec2 describe-security-groups \
--filters "Name=group-name,Values=*awseb*" \
--query 'SecurityGroups[*].[GroupId,GroupName]' --output table
aws ec2 describe-security-groups \
--group-ids <sg-id> \
--query 'SecurityGroups[0].IpPermissions' --output json
aws ec2 describe-security-groups \
--group-ids <sg-id> \
--query 'SecurityGroups[0].IpPermissions[?IpRanges[?CidrIp==`0.0.0.0/0`]]' --output json
# Service role
aws iam get-role --role-name aws-elasticbeanstalk-service-role --output json
aws iam list-attached-role-policies --role-name aws-elasticbeanstalk-service-role --output table
# Instance profile
aws iam list-attached-role-policies --role-name aws-elasticbeanstalk-ec2-role --output table
aws ec2 describe-instances \
--filters "Name=tag:elasticbeanstalk:environment-name,Values=<env-name>" \
--query 'Reservations[*].Instances[*].[InstanceId,State.Name,PublicIpAddress]' --output table
aws cloudwatch list-metrics \
--namespace AWS/ElasticBeanstalk \
--dimensions Name=EnvironmentName,Value=<env-name> --output table
Key metrics: EnvironmentHealth, ApplicationRequests5xx, ApplicationLatencyP99, CPUUtilization, InstancesOk
# macOS:
aws cloudwatch get-metric-statistics \
--namespace AWS/ElasticBeanstalk \
--metric-name CPUUtilization \
--dimensions Name=EnvironmentName,Value=<env-name> \
--start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%S) \
--end-time $(date -u +%Y-%m-%dT%H:%M:%S) \
--period 300 --statistics Average Maximum --output table
# Linux:
aws cloudwatch get-metric-statistics \
--namespace AWS/ElasticBeanstalk \
--metric-name CPUUtilization \
--dimensions Name=EnvironmentName,Value=<env-name> \
--start-time $(date -u -d '1 hour ago' +%Y-%m-%dT%H:%M:%S) \
--end-time $(date -u +%Y-%m-%dT%H:%M:%S) \
--period 300 --statistics Average Maximum --output table
aws sns create-topic --name eb-alerts --output json
aws sns subscribe --topic-arn <arn> --protocol email --notification-endpoint [email protected]
# High 5xx errors
aws cloudwatch put-metric-alarm \
--alarm-name "<env>-high-5xx" \
--namespace AWS/ElasticBeanstalk --metric-name ApplicationRequests5xx \
--dimensions Name=EnvironmentName,Value=<env-name> \
--statistic Sum --period 300 --evaluation-periods 2 --threshold 10 \
--comparison-operator GreaterThanThreshold --alarm-actions <sns-arn>
# High CPU
aws cloudwatch put-metric-alarm \
--alarm-name "<env>-high-cpu" \
--namespace AWS/ElasticBeanstalk --metric-name CPUUtilization \
--dimensions Name=EnvironmentName,Value=<env-name> \
--statistic Average --period 300 --evaluation-periods 3 --threshold 80 \
--comparison-operator GreaterThanThreshold --alarm-actions <sns-arn>
# Environment unhealthy
aws cloudwatch put-metric-alarm \
--alarm-name "<env>-unhealthy" \
--namespace AWS/ElasticBeanstalk --metric-name EnvironmentHealth \
--dimensions Name=EnvironmentName,Value=<env-name> \
--statistic Maximum --period 300 --evaluation-periods 1 --threshold 15 \
--comparison-operator GreaterThanOrEqualToThreshold --alarm-actions <sns-arn>
aws cloudwatch describe-alarms --alarm-name-prefix "<env>" --output table
aws cloudwatch delete-alarms --alarm-names "<alarm-name>"
# macOS:
aws ce get-cost-and-usage \
--time-period Start=$(date -u -v-1m +%Y-%m-01),End=$(date -u +%Y-%m-01) \
--granularity MONTHLY --metrics UnblendedCost \
--group-by Type=DIMENSION,Key=SERVICE --output json
# Linux:
aws ce get-cost-and-usage \
--time-period Start=$(date -u -d '1 month ago' +%Y-%m-01),End=$(date -u +%Y-%m-01) \
--granularity MONTHLY --metrics UnblendedCost \
--group-by Type=DIMENSION,Key=SERVICE --output json
# macOS:
aws ce get-cost-and-usage \
--time-period Start=$(date -u -v-1m +%Y-%m-01),End=$(date -u +%Y-%m-01) \
--granularity MONTHLY --metrics UnblendedCost \
--filter '{"Tags":{"Key":"elasticbeanstalk:environment-name","Values":["<env-name>"]}}' \
--group-by Type=DIMENSION,Key=SERVICE --output json
# Linux:
aws ce get-cost-and-usage \
--time-period Start=$(date -u -d '1 month ago' +%Y-%m-01),End=$(date -u +%Y-%m-01) \
--granularity MONTHLY --metrics UnblendedCost \
--filter '{"Tags":{"Key":"elasticbeanstalk:environment-name","Values":["<env-name>"]}}' \
--group-by Type=DIMENSION,Key=SERVICE --output json
# macOS:
aws ce get-cost-forecast \
--time-period Start=$(date -u +%Y-%m-%d),End=$(date -u -v+1m +%Y-%m-01) \
--metric UNBLENDED_COST --granularity MONTHLY --output json
# Linux:
aws ce get-cost-forecast \
--time-period Start=$(date -u +%Y-%m-%d),End=$(date -u -d '1 month' +%Y-%m-01) \
--metric UNBLENDED_COST --granularity MONTHLY --output json
--single (no LB, saves ~$16/month)deploy skillstatus skilllogs skillconfig skilltroubleshoot skillenvironment skilleb-docs skillnpx claudepluginhub shinmc/aws-beanstalk-skills --plugin aws-beanstalkProvides structured AWS cost optimization via five pillars (right-sizing, elasticity, pricing, storage, monitoring) and 12 best practices with AWS CLI examples. For reviewing spending, unused resources, FinOps.
Analyzes AWS costs using CLI and Cost Explorer, detects idle EC2 instances, unused EBS volumes, and old snapshots, and recommends rightsizing and savings plans.
Enforces AWS security baselines for IAM, VPC, CloudTrail, RDS, and ElastiCache. Use when building, reviewing, or auditing AWS infrastructure.