@@ -861,110 +861,6 @@ Resources:
861861 # AgentCore Analytics Lambda Function
862862 # #########################################################################
863863
864- AgentCoreAnalyticsLambdaRole :
865- Type : AWS::IAM::Role
866- Condition : CreateAgentCoreLambda
867- Properties :
868- RoleName : !Sub "${AWS::StackName}-AgentCore-Analytics-Role"
869- AssumeRolePolicyDocument :
870- Version : ' 2012-10-17'
871- Statement :
872- - Effect : Allow
873- Principal :
874- Service : !Sub "lambda.${AWS::URLSuffix}"
875- Action : sts:AssumeRole
876- PermissionsBoundary : !If [ HasPermissionsBoundary, !Ref PermissionsBoundaryArn, !Ref "AWS::NoValue" ]
877- ManagedPolicyArns :
878- - !Sub " arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
879- Policies :
880- - PolicyName : AthenaQueryPolicy
881- PolicyDocument :
882- Version : ' 2012-10-17'
883- Statement :
884- - Effect : Allow
885- Action :
886- - athena:StartQueryExecution
887- - athena:GetQueryExecution
888- - athena:GetQueryResults
889- - athena:StopQueryExecution
890- Resource : !Sub "arn:${AWS::Partition}:athena:${AWS::Region}:${AWS::AccountId}:workgroup/primary"
891- - PolicyName : S3AccessPolicy
892- PolicyDocument :
893- Version : ' 2012-10-17'
894- Statement :
895- - Effect : Allow
896- Action :
897- - s3:GetObject
898- - s3:PutObject
899- - s3:DeleteObject
900- - s3:AbortMultipartUpload
901- - s3:ListMultipartUploadParts
902- Resource : !Sub
903- - " ${BucketArn}/*"
904- - BucketArn : !If
905- - ShouldCreateReportingBucket
906- - !GetAtt ReportingBucket.Arn
907- - !Sub " arn:${AWS::Partition}:s3:::${ReportingBucketName}"
908- - Effect : Allow
909- Action :
910- - s3:ListBucket
911- - s3:GetBucketLocation
912- - s3:GetBucketVersioning
913- Resource : !If
914- - ShouldCreateReportingBucket
915- - !GetAtt ReportingBucket.Arn
916- - !Sub " arn:${AWS::Partition}:s3:::${ReportingBucketName}"
917- - PolicyName : GlueReadPolicy
918- PolicyDocument :
919- Version : ' 2012-10-17'
920- Statement :
921- - Effect : Allow
922- Action :
923- - glue:GetDatabase
924- - glue:GetTable
925- - glue:GetTables
926- - glue:GetPartitions
927- Resource :
928- - !Sub " arn:${AWS::Partition}:glue:${AWS::Region}:${AWS::AccountId}:catalog"
929- - !Sub " arn:${AWS::Partition}:glue:${AWS::Region}:${AWS::AccountId}:database/${ReportingDatabase}"
930- - !Sub " arn:${AWS::Partition}:glue:${AWS::Region}:${AWS::AccountId}:table/${ReportingDatabase}/*"
931- - PolicyName : KMSDecryptPolicy
932- PolicyDocument :
933- Version : ' 2012-10-17'
934- Statement :
935- - Effect : Allow
936- Action :
937- - kms:Decrypt
938- - kms:Encrypt
939- - kms:ReEncrypt*
940- - kms:GenerateDataKey*
941- - kms:DescribeKey
942- Resource : !GetAtt CustomerManagedEncryptionKey.Arn
943- - PolicyName : BedrockInvokePolicy
944- PolicyDocument :
945- Version : ' 2012-10-17'
946- Statement :
947- - Effect : Allow
948- Action :
949- - bedrock:InvokeModel
950- - bedrock:InvokeModelWithResponseStream
951- Resource :
952- - !Sub " arn:${AWS::Partition}:bedrock:*::foundation-model/*"
953- - !Sub " arn:${AWS::Partition}:bedrock:${AWS::Region}:${AWS::AccountId}:inference-profile/*"
954- - PolicyName : DynamoDBReadPolicy
955- PolicyDocument :
956- Version : ' 2012-10-17'
957- Statement :
958- - Effect : Allow
959- Action :
960- - dynamodb:GetItem
961- - dynamodb:Query
962- - dynamodb:Scan
963- Resource :
964- - !GetAtt ConfigurationTable.Arn
965- - !GetAtt TrackingTable.Arn
966- - !GetAtt AgentTable.Arn
967-
968864 AgentCoreAnalyticsLambdaLogGroup :
969865 Type : AWS::Logs::LogGroup
970866 Condition : CreateAgentCoreLambda
@@ -8252,43 +8148,27 @@ Outputs:
82528148 ExternalMCPAgentsSecretConsoleURL :
82538149 Description : External MCP Agents secret console URL - configure MCP server credentials here (JSON array format)
82548150 Value : !Sub "https://${AWS::Region}.console.aws.amazon.com/secretsmanager/secret?name=${AWS::StackName}/external-mcp-agents/credentials®ion=${AWS::Region}"
8255- ExternalAppTokenURL :
8256- Condition : CreateExternalAppClient
8257- Description : " OAuth2 Token URL for external app authentication"
8258- Value : !Sub "https://${GetDomain.OutputString}.auth.${AWS::Region}.amazoncognito.com/oauth2/token"
8259- ExternalAppAuthorizationURL :
8260- Condition : CreateExternalAppClient
8261- Description : " OAuth2 Authorization URL for external app authentication"
8262- Value : !Sub "https://${GetDomain.OutputString}.auth.${AWS::Region}.amazoncognito.com/oauth2/authorize"
8263- ExternalAppClientId :
8264- Condition : CreateExternalAppClient
8265- Description : " Cognito Client ID for external applications (e.g., QuickSuite)"
8266- Value : !Ref ExternalAppClient
8267- ExternalAppClientSecret :
8268- Condition : CreateExternalAppClient
8269- Description : " Cognito Client Secret for external applications (e.g., QuickSuite)"
8270- Value : !GetAtt ExternalAppClient.ClientSecret
8271- ExternalAppUserPoolId :
8272- Condition : CreateExternalAppClient
8273- Description : " User Pool ID for external applications"
8274- Value : !Ref UserPool
8275- AgentCoreAnalyticsLambdaArn :
8151+ MCPServerEndpoint :
82768152 Condition : CreateAgentCoreLambda
8277- Description : " ARN of the AgentCore Analytics Lambda function "
8278- Value : !GetAtt AgentCoreAnalyticsLambdaFunction.Arn
8279- AgentCoreAnalyticsLambdaName :
8153+ Description : MCP Server Endpoint
8154+ Value : !GetAtt AgentCoreGateway.GatewayUrl
8155+ MCPClientId :
82808156 Condition : CreateAgentCoreLambda
8281- Description : " Name of the AgentCore Analytics Lambda function "
8282- Value : !Ref AgentCoreAnalyticsLambdaFunction
8283- AgentCoreGatewayUrl :
8157+ Description : MCP Client ID
8158+ Value : !Ref ExternalAppClient
8159+ MCPClientSecret :
82848160 Condition : CreateAgentCoreLambda
8285- Description : " URL of the AgentCore Gateway for analytics "
8286- Value : !GetAtt AgentCoreGateway.GatewayUrl
8287- AgentCoreGatewayId :
8161+ Description : MCP Client Secret
8162+ Value : !GetAtt ExternalAppClient.ClientSecret
8163+ MCPUserPool :
82888164 Condition : CreateAgentCoreLambda
8289- Description : " ID of the AgentCore Gateway"
8290- Value : !GetAtt AgentCoreGateway.GatewayId
8291- AgentCoreGatewayArn :
8165+ Description : MCP User Pool ID
8166+ Value : !Ref UserPool
8167+ MCPTokenURL :
8168+ Condition : CreateAgentCoreLambda
8169+ Description : MCP Token URL
8170+ Value : !Sub "https://${GetDomain.OutputString}.auth.${AWS::Region}.amazoncognito.com/oauth2/token"
8171+ MCPAuthorizationURL :
82928172 Condition : CreateAgentCoreLambda
8293- Description : " ARN of the AgentCore Gateway "
8294- Value : !GetAtt AgentCoreGateway.GatewayArn
8173+ Description : MCP Authorization URL
8174+ Value : !Sub "https://${GetDomain.OutputString}.auth.${AWS::Region}.amazoncognito.com/oauth2/authorize"
0 commit comments