@@ -1134,6 +1134,12 @@ Resources:
11341134 - logs:CreateLogGroup
11351135 - logs:PutLogEvents
11361136 - logs:DeleteLogGroup
1137+ - logs:PutDeliverySource
1138+ - logs:DeleteDeliverySource
1139+ - logs:PutDeliveryDestination
1140+ - logs:DeleteDeliveryDestination
1141+ - logs:DescribeDeliveryDestinations
1142+ - logs:DescribeDeliverySources
11371143 - iam:PassRole
11381144 - iam:CreateRole
11391145 - iam:AttachRolePolicy
@@ -1156,13 +1162,46 @@ Resources:
11561162 KmsKeyId : !GetAtt CustomerManagedEncryptionKey.Arn
11571163 RetentionInDays : !Ref LogRetentionDays
11581164
1165+ AgentCoreGatewayExecutionRole :
1166+ Type : AWS::IAM::Role
1167+ Condition : CreateAgentCoreLambda
1168+ Properties :
1169+ RoleName : !Sub "${AWS::StackName}-AgentCoreGatewayExecutionRole"
1170+ Description : Execution role for AgentCore Gateway
1171+ AssumeRolePolicyDocument :
1172+ Version : " 2012-10-17"
1173+ Statement :
1174+ - Effect : Allow
1175+ Principal :
1176+ Service : !Sub "bedrock-agentcore.${AWS::URLSuffix}"
1177+ Action : sts:AssumeRole
1178+ Condition :
1179+ StringEquals :
1180+ aws:SourceAccount : !Ref AWS::AccountId
1181+ ArnLike :
1182+ aws:SourceArn : !Sub "arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:*"
1183+ Policies :
1184+ - PolicyName : InvokeLambdaPolicy
1185+ PolicyDocument :
1186+ Version : " 2012-10-17"
1187+ Statement :
1188+ - Effect : Allow
1189+ Action : lambda:InvokeFunction
1190+ Resource : !GetAtt AgentCoreAnalyticsLambdaFunction.Arn
1191+ ManagedPolicyArns :
1192+ - !Sub " arn:${AWS::Partition}:iam::aws:policy/CloudWatchLogsFullAccess"
1193+ Tags :
1194+ - Key : Name
1195+ Value : !Sub "${AWS::StackName}-AgentCoreGatewayExecutionRole"
1196+
11591197 AgentCoreGateway :
11601198 Type : Custom::AgentCoreGateway
11611199 Condition : CreateAgentCoreLambda
11621200 DependsOn :
11631201 - AgentCoreAnalyticsLambdaFunction
11641202 - ExternalAppClient
11651203 - UserPool
1204+ - AgentCoreGatewayExecutionRole
11661205 Properties :
11671206 ServiceToken : !GetAtt AgentCoreGatewayManagerFunction.Arn
11681207 StackName : !Ref AWS::StackName
@@ -1171,6 +1210,7 @@ Resources:
11711210 UserPoolId : !Ref UserPool
11721211 ClientId : !Ref ExternalAppClient
11731212 ClientSecret : !GetAtt ExternalAppClient.ClientSecret
1213+ ExecutionRoleArn : !GetAtt AgentCoreGatewayExecutionRole.Arn
11741214 SourceCodeHash : <LAMBDA_HASH_TOKEN>
11751215
11761216 # #########################################################################
@@ -5208,7 +5248,7 @@ Resources:
52085248 - profile
52095249 CallbackURLs :
52105250 - !Sub " https://${GetDomain.OutputString}.auth.${AWS::Region}.amazoncognito.com"
5211- - " https://us-east-1 .quicksight.aws.amazon.com/sn/oauthcallback"
5251+ - !Sub " https://${AWS::Region} .quicksight.aws.amazon.com/sn/oauthcallback"
52125252 - !Sub " https://${CloudFrontDistribution.DomainName}/"
52135253 LogoutURLs :
52145254 - !Sub " https://${GetDomain.OutputString}.auth.${AWS::Region}.amazoncognito.com"
0 commit comments