Skip to content

Commit 3b9054a

Browse files
committed
feat: Create AgentCore Gateway service role for integ tests
1 parent aa219c4 commit 3b9054a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

e2e_tests/setup/integ-test-authentication.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,43 @@ Resources:
175175
Principal:
176176
Service: lambda.amazonaws.com
177177

178+
BedrockAgentCoreGatewaysRole:
179+
Type: AWS::IAM::Role
180+
Properties:
181+
RoleName: mcp-lambda-example-agentcore-gateways
182+
AssumeRolePolicyDocument:
183+
Statement:
184+
- Effect: Allow
185+
Action: sts:AssumeRole
186+
Principal:
187+
Service: bedrock-agentcore.amazonaws.com
188+
189+
# From https://github.com/aws/bedrock-agentcore-starter-toolkit/blob/main/src/bedrock_agentcore_starter_toolkit/operations/gateway/constants.py#L58-L80
190+
BedrockAgentCoreGatewaysPolicy:
191+
Type: "AWS::IAM::Policy"
192+
Properties:
193+
PolicyName: bedrock-agentcore-full-access
194+
PolicyDocument:
195+
Version: "2012-10-17"
196+
Statement:
197+
- Effect: Allow
198+
Action:
199+
- "bedrock-agentcore:*"
200+
Resource:
201+
- "arn:aws:bedrock-agentcore:*:*:*"
202+
- Effect: Allow
203+
Action:
204+
- "secretsmanager:GetSecretValue"
205+
Resource:
206+
- "*"
207+
- Effect: Allow
208+
Action:
209+
- "lambda:InvokeFunction"
210+
Resource:
211+
- "arn:aws:lambda:*:*:function:*"
212+
Roles:
213+
- !Ref BedrockAgentCoreGatewaysRole
214+
178215
Outputs:
179216
Role:
180217
Value: !GetAtt IntegrationTestRole.Arn

0 commit comments

Comments
 (0)