aws / aws/agentcore-cli

Support environment variable configuration per target and runtime combination

Open
#1,190 2 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

### Description
Currently we don't have a clean way to manage different configurations for different environments. We need separate environment variables depending on whether we're deploying to dev or staging.

For example:

1. `dev target + supervisor runtime` ==> use LLM_PROVIDER=openai
2. `staging target + supervisor runtime` ==> use LLM_PROVIDER=bedrock

I'm just giving one example, but there could be many such variables."

### Proposed Solution
Introduce per-environment configuration files, for example:
- `agentcore-dev.json` — for development target with supervisor runtime
- `agentcore-staging.json` — for staging target with supervisor runtime

These should be loaded by `agentcore deploy` during deployment.

### Example Usage
```bash
# For dev environment
agentcore deploy --config agentcore-dev.json

# For staging environment
agentcore deploy --config agentcore-staging.json
```

### Additional Context

```json
"runtimes": [
{
"name": "supervisor",
"build": "Container",
"entrypoint": "main.py",
"codeLocation": "app/supervisor/",
"runtimeVersion": "PYTHON_3_13",
"envVars": [
{
"name": "OPENAI_IDENTITY_PROVIDER_NAME",
"value": "OpenAI"
},
{
"name": "OPENAI_BASE_URL_PARAMETER_NAME",
"value": "/xxx-platform-agents/openai/base-url"
},
{
"name": "AWS_REGION",
"value": "ap-northeast-1"
},
{
"name": "MCP_SERVER_URL",
"value": "https://xxxx-yyy-gateway-xxxx.gateway.bedrock-agentcore.ap-northeast-1.amazonaws.com/mcp"
}
],
"networkMode": "PUBLIC",
"protocol": "HTTP"
},
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.