Skip to content

Commit 5f8cc06

Browse files
committed
security: 添加Bedrock模型ARN参数,支持环境变量注入
- 添加BedrockHaikuModelArn、BedrockSonnetModelArn、BedrockOpusModelArn参数 - 参数可选且使用NoEcho保护敏感信息 - 创建samconfig.toml.example模板供参考
1 parent acc6f6e commit 5f8cc06

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

samconfig.toml.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version = 0.1
2+
3+
[default.build.parameters]
4+
use_container = true
5+
6+
[default.deploy.parameters]
7+
stack_name = "omnicloud-agent"
8+
confirm_changeset = true
9+
capabilities = "CAPABILITY_IAM"
10+
resolve_s3 = true
11+
s3_prefix = "omnicloud-agent"
12+
profile = "YOUR_AWS_PROFILE" # 替换为你的AWS profile
13+
disable_rollback = true
14+
image_repositories = ["AgentServerFunction=YOUR_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/omnicloudagentea80e707/agentserverfunction769568e1repo"] # 替换为你的AWS账户ID和ECR仓库
15+
16+
[default.global.parameters]
17+
region = "us-east-1"

template.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ Parameters:
1616
Type: String
1717
Default: 'change-me-in-production'
1818
NoEcho: true
19+
BedrockHaikuModelArn:
20+
Type: String
21+
Default: ''
22+
Description: (Optional) ARN for Bedrock Haiku model (format: arn:aws:bedrock:REGION:ACCOUNT:application-inference-profile/PROFILE_ID)
23+
NoEcho: true
24+
BedrockSonnetModelArn:
25+
Type: String
26+
Default: ''
27+
Description: (Optional) ARN for Bedrock Sonnet model (format: arn:aws:bedrock:REGION:ACCOUNT:application-inference-profile/PROFILE_ID)
28+
NoEcho: true
29+
BedrockOpusModelArn:
30+
Type: String
31+
Default: ''
32+
Description: (Optional) ARN for Bedrock Opus 4.5 model (format: arn:aws:bedrock:REGION:ACCOUNT:application-inference-profile/PROFILE_ID)
33+
NoEcho: true
1934

2035
Globals:
2136
Function:

0 commit comments

Comments
 (0)