AgentSkillsCN

config

当用户询问“显示配置”“当前配置是什么”“更改设置”“环境变量”“扩展设置”“EB配置”“EB设置环境变量”“EB打印环境变量”“EB扩展设置”“设置环境变量”“更改实例类型”“配置扩展设置”“HTTPS监听器”“增强型健康监测”“配置模板”“标签”时,或希望阅读/修改Elastic Beanstalk配置时,应使用此技能。若要创建环境,请使用环境技能;若要配置SSL证书,请使用eb-infra技能。

SKILL.md
--- frontmatter
name: config
description: This skill should be used when the user asks "show config", "what's configured", "change settings", "environment variables", "scaling settings", "eb config", "eb setenv", "eb printenv", "eb scale", "set env vars", "change instance type", "configure scaling", "HTTPS listener", "enhanced health", "config template", "tags", or wants to read/modify Elastic Beanstalk configuration. For environment creation use environment skill. For SSL certificate setup use eb-infra skill.

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 environment skill
  • SSL certificate management → use eb-infra skill
  • Deploying code → use deploy skill
  • Secrets Manager / SSM → use eb-infra skill

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 deploy skill
  • Check status: Use status skill
  • Create new environment: Use environment skill
  • SSL/secrets/database config: Use eb-infra skill

Additional Resources