diff --git a/docs/en/DEPLOY_OPTION.md b/docs/en/DEPLOY_OPTION.md index f6dae5d66..b04e3c1a1 100644 --- a/docs/en/DEPLOY_OPTION.md +++ b/docs/en/DEPLOY_OPTION.md @@ -1810,6 +1810,48 @@ const envs: Record> = { - samlCognitoDomainName: Specify the Cognito Domain name to be set in Cognito's App integration. - samlCognitoFederatedIdentityProviderName: Specify the Identity Provider name to be set in Cognito's Sign-in experience. +### MFA (Multi-Factor Authentication) + +You can enable email-based MFA for Cognito user pool authentication. When MFA is enabled, users must enter a verification code sent to their registered email address after entering their password. + +> [!NOTE] +> MFA uses Amazon SES to send verification code emails. Before enabling MFA, you must verify the sender domain or email address in SES, and ensure SES is out of the sandbox (or that destination addresses are verified). Specify the verified sender address in `mfaFromEmail`. + +> [!WARNING] +> When MFA is enabled, the "Forgot Password?" link on the sign-in screen is hidden. This is because Cognito cannot use the same email address for both MFA verification codes and password reset emails simultaneously. Password resets must be performed by an administrator via the Cognito service screen in the AWS Management Console. + +Set `mfaEnabled` to `true` and specify the SES-verified sender address in `mfaFromEmail`. (Default is `false`) + +- mfaEnabled: Set to `true` to require email MFA for all users. (Default: `false`) +- mfaFromEmail: Sender email address for MFA verification codes. Must be verified in Amazon SES. +- mfaReplyToEmail: Reply-to email address for MFA emails. (Default: `null`) + +**Edit [parameter.ts](/packages/cdk/parameter.ts)** + +```typescript +// parameter.ts +const envs: Record> = { + dev: { + mfaEnabled: true, + mfaFromEmail: 'no-reply@your-domain.com', + mfaReplyToEmail: null, + }, +}; +``` + +**Edit [packages/cdk/cdk.json](/packages/cdk/cdk.json)** + +```json +// cdk.json +{ + "context": { + "mfaEnabled": true, + "mfaFromEmail": "no-reply@your-domain.com", + "mfaReplyToEmail": null + } +} +``` + ### Guardrails When using the Converse API (i.e., generative AI models that produce text output), guardrails can be applied. To configure this, change `guardrailEnabled` to `true` and redeploy. diff --git a/docs/ja/DEPLOY_OPTION.md b/docs/ja/DEPLOY_OPTION.md index bb370e6f5..8fc64f590 100644 --- a/docs/ja/DEPLOY_OPTION.md +++ b/docs/ja/DEPLOY_OPTION.md @@ -1817,6 +1817,48 @@ const envs: Record> = { - samlCognitoDomainName : Cognito の App integration で設定する Cognito Domain 名を指定します。 - samlCognitoFederatedIdentityProviderName : Cognito の Sign-in experience で設定する Identity Provider の名前を指定します。 +### MFA(多要素認証) + +Cognito ユーザープールにおける認証として、メールベースの MFA を有効化できます。MFA を有効にすると、ユーザーはパスワード入力後に登録済みのメールアドレスへ送信された認証コードの入力が求められます。 + +> [!NOTE] +> MFA の認証コードの送信には Amazon SES を使用します。MFA を有効化する前に、SES で送信元ドメインまたはメールアドレスを検証済みとする必要があります。検証済みの送信元メールアドレスを `mfaFromEmail` に指定してください。 + +> [!WARNING] +> MFA を有効にした場合、ログイン画面の「パスワードを忘れましたか?」リンクは非表示になります。これは Cognito が MFA 認証コードとパスワードリセットに同じメールアドレスを同時に使用できないためです。パスワードのリセットは管理者がAWSマネジメントコンソールの Cognito サービス画面から行う必要があります。 + +`mfaEnabled` を `true` に設定し、SES で検証済みの送信元メールアドレスを `mfaFromEmail` に指定します。(デフォルトは `false`) + +- mfaEnabled : `true` にすることで、全ユーザーにメール MFA を必須化します。(デフォルト: `false`) +- mfaFromEmail : MFA 認証コードの送信元メールアドレス。Amazon SES で検証済みである必要があります。 +- mfaReplyToEmail : MFA メールの Reply-To に設定するメールアドレス。(デフォルト: `null`) + +**[parameter.ts](/packages/cdk/parameter.ts) を編集** + +```typescript +// parameter.ts +const envs: Record> = { + dev: { + mfaEnabled: true, + mfaFromEmail: 'no-reply@your-domain.com', + mfaReplyToEmail: null, + }, +}; +``` + +**[packages/cdk/cdk.json](/packages/cdk/cdk.json) を編集** + +```json +// cdk.json +{ + "context": { + "mfaEnabled": true, + "mfaFromEmail": "no-reply@your-domain.com", + "mfaReplyToEmail": null + } +} +``` + ### ガードレール Converse API を使う(=テキスト出力を行う生成 AI モデル)場合はガードレールを適用させることが可能です。設定するには `guardrailEnabled` を `true` に変更しデプロイしなおします。 diff --git a/docs/ko/DEPLOY_OPTION.md b/docs/ko/DEPLOY_OPTION.md index 06caa0b54..f29b6a2d3 100644 --- a/docs/ko/DEPLOY_OPTION.md +++ b/docs/ko/DEPLOY_OPTION.md @@ -1703,6 +1703,48 @@ const envs: Record> = { - samlCognitoDomainName: Cognito의 App integration에 설정할 Cognito 도메인 이름을 지정합니다. - samlCognitoFederatedIdentityProviderName: Cognito의 Sign-in experience에 설정할 Identity Provider 이름을 지정합니다. +### MFA (다단계 인증) + +Cognito 사용자 풀 인증에 이메일 기반 MFA를 활성화할 수 있습니다. MFA를 활성화하면 사용자는 비밀번호 입력 후 등록된 이메일 주소로 전송된 인증 코드를 입력해야 합니다. + +> [!NOTE] +> MFA는 인증 코드 이메일 발송에 Amazon SES를 사용합니다. MFA를 활성화하기 전에 SES에서 발신자 도메인 또는 이메일 주소를 검증하고, SES 샌드박스를 해제(또는 수신 주소를 검증)해야 합니다. 검증된 발신자 주소를 `mfaFromEmail`에 지정하세요. + +> [!WARNING] +> MFA를 활성화하면 로그인 화면의 "비밀번호를 잊으셨나요?" 링크가 숨겨집니다. 이는 Cognito가 MFA 인증 코드와 비밀번호 재설정에 동일한 이메일 주소를 동시에 사용할 수 없기 때문입니다. 비밀번호 재설정은 관리자가 AWS Management Console의 Cognito 서비스 화면에서 수행해야 합니다. + +`mfaEnabled`를 `true`로 설정하고 SES에서 검증된 발신자 주소를 `mfaFromEmail`에 지정합니다. (기본값: `false`) + +- mfaEnabled: `true`로 설정하면 모든 사용자에게 이메일 MFA가 필수화됩니다. (기본값: `false`) +- mfaFromEmail: MFA 인증 코드의 발신자 이메일 주소. Amazon SES에서 검증되어야 합니다. +- mfaReplyToEmail: MFA 이메일의 Reply-To 주소. (기본값: `null`) + +**[parameter.ts](/packages/cdk/parameter.ts) 편집** + +```typescript +// parameter.ts +const envs: Record> = { + dev: { + mfaEnabled: true, + mfaFromEmail: 'no-reply@your-domain.com', + mfaReplyToEmail: null, + }, +}; +``` + +**[packages/cdk/cdk.json](/packages/cdk/cdk.json) 편집** + +```json +// cdk.json +{ + "context": { + "mfaEnabled": true, + "mfaFromEmail": "no-reply@your-domain.com", + "mfaReplyToEmail": null + } +} +``` + ### 가드레일 Converse API를 사용할 때 (즉, 텍스트 출력을 생성하는 생성형 AI 모델) 가드레일을 적용할 수 있습니다. 이를 구성하려면 `guardrailEnabled`를 `true`로 변경하고 재배포합니다. diff --git a/packages/cdk/cdk.json b/packages/cdk/cdk.json index 1f078bc69..aae01a87f 100644 --- a/packages/cdk/cdk.json +++ b/packages/cdk/cdk.json @@ -39,6 +39,9 @@ "samlAuthEnabled": false, "samlCognitoDomainName": "", "samlCognitoFederatedIdentityProviderName": "", + "mfaEnabled": false, + "mfaFromEmail": "no-reply@example.com", + "mfaReplyToEmail": null, "hiddenUseCases": {}, "modelRegion": "us-east-1", "modelIds": [ diff --git a/packages/cdk/lib/construct/auth.ts b/packages/cdk/lib/construct/auth.ts index ba13292fc..071f1bd50 100644 --- a/packages/cdk/lib/construct/auth.ts +++ b/packages/cdk/lib/construct/auth.ts @@ -1,7 +1,9 @@ import { Duration } from 'aws-cdk-lib'; import { + Mfa, UserPool, UserPoolClient, + UserPoolEmail, UserPoolOperation, } from 'aws-cdk-lib/aws-cognito'; import { @@ -19,6 +21,9 @@ export interface AuthProps { readonly allowedIpV6AddressRanges?: string[] | null; readonly allowedSignUpEmailDomains?: string[] | null; readonly samlAuthEnabled: boolean; + readonly mfaEnabled: boolean; + readonly mfaFromEmail: string; + readonly mfaReplyToEmail?: string | null; } export class Auth extends Construct { @@ -29,6 +34,15 @@ export class Auth extends Construct { constructor(scope: Construct, id: string, props: AuthProps) { super(scope, id); + // Email configuration for MFA + const emailConfig = props.mfaEnabled + ? UserPoolEmail.withSES({ + fromEmail: props.mfaFromEmail, + replyTo: props.mfaReplyToEmail ?? undefined, + sesVerifiedDomain: props.mfaFromEmail?.split('@').pop(), + }) + : undefined; + const userPool = new UserPool(this, 'UserPool', { // If SAML authentication is enabled, do not use self-sign-up with UserPool. Be aware of security. selfSignUpEnabled: props.samlAuthEnabled @@ -44,6 +58,16 @@ export class Auth extends Construct { requireDigits: true, minLength: 8, }, + // MFA configuration + mfa: props.mfaEnabled ? Mfa.REQUIRED : Mfa.OFF, + mfaSecondFactor: props.mfaEnabled + ? { + sms: false, + otp: false, + email: true, + } + : undefined, + email: emailConfig, }); const client = userPool.addClient('client', { diff --git a/packages/cdk/lib/construct/web.ts b/packages/cdk/lib/construct/web.ts index 293789257..ad21ef314 100644 --- a/packages/cdk/lib/construct/web.ts +++ b/packages/cdk/lib/construct/web.ts @@ -74,6 +74,7 @@ export interface WebProps { logoPath?: string; title?: string; }; + readonly mfaEnabled: boolean; } export class Web extends Construct { @@ -314,6 +315,7 @@ export class Web extends Construct { ), VITE_APP_BRANDING_LOGO_PATH: props.brandingConfig?.logoPath ?? '', VITE_APP_BRANDING_TITLE: props.brandingConfig?.title ?? '', + VITE_APP_MFA_ENABLED: props.mfaEnabled.toString(), }, }); // Enhance computing resources diff --git a/packages/cdk/lib/generative-ai-use-cases-stack.ts b/packages/cdk/lib/generative-ai-use-cases-stack.ts index 622f821e9..07ba8023d 100644 --- a/packages/cdk/lib/generative-ai-use-cases-stack.ts +++ b/packages/cdk/lib/generative-ai-use-cases-stack.ts @@ -134,6 +134,9 @@ export class GenerativeAiUseCasesStack extends Stack { allowedIpV6AddressRanges: params.allowedIpV6AddressRanges, allowedSignUpEmailDomains: params.allowedSignUpEmailDomains, samlAuthEnabled: params.samlAuthEnabled, + mfaEnabled: params.mfaEnabled, + mfaFromEmail: params.mfaFromEmail, + mfaReplyToEmail: params.mfaReplyToEmail, }); // Database @@ -309,6 +312,8 @@ export class GenerativeAiUseCasesStack extends Stack { cognitoIdentityPoolProxyEndpoint: props.cognitoIdentityPoolProxyEndpoint, // Branding brandingConfig: params.brandingConfig, + // MFA + mfaEnabled: params.mfaEnabled, }); // RAG diff --git a/packages/cdk/lib/stack-input.ts b/packages/cdk/lib/stack-input.ts index 25ebad8f3..e26790f77 100644 --- a/packages/cdk/lib/stack-input.ts +++ b/packages/cdk/lib/stack-input.ts @@ -13,6 +13,9 @@ const baseStackInputSchema = z.object({ samlAuthEnabled: z.boolean().default(false), samlCognitoDomainName: z.string().nullish(), samlCognitoFederatedIdentityProviderName: z.string().nullish(), + mfaEnabled: z.boolean().default(false), + mfaFromEmail: z.string().email().default('no-reply@example.com'), + mfaReplyToEmail: z.string().nullish(), // Frontend hiddenUseCases: z .object({ diff --git a/packages/cdk/test/__snapshots__/generative-ai-use-cases.test.ts.snap b/packages/cdk/test/__snapshots__/generative-ai-use-cases.test.ts.snap index 171eac461..16a1e352b 100644 --- a/packages/cdk/test/__snapshots__/generative-ai-use-cases.test.ts.snap +++ b/packages/cdk/test/__snapshots__/generative-ai-use-cases.test.ts.snap @@ -19094,6 +19094,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 6`] = ` "VITE_APP_MCP_ENABLED": "false", "VITE_APP_MCP_ENDPOINT": "", "VITE_APP_MCP_SERVERS_CONFIG": "{"time":{"metadata":{"category":"Utility","description":"Provides current time and date functionality"}},"aws-knowledge-mcp-server":{"metadata":{"category":"AWS","description":"AWS Knowledge Base MCP server for enterprise knowledge access"}},"awslabs.aws-documentation-mcp-server":{"metadata":{"category":"AWS","description":"Access AWS documentation and guides"}},"awslabs.cdk-mcp-server":{"metadata":{"category":"AWS","description":"AWS CDK code generation and assistance"}},"awslabs.aws-diagram-mcp-server":{"metadata":{"category":"AWS","description":"Generate AWS architecture diagrams"}},"awslabs.nova-canvas-mcp-server":{"metadata":{"category":"AI/ML","description":"Amazon Nova Canvas image generation"}},"tavily-search":{"metadata":{"category":"Search","description":"Web search and research capabilities powered by Tavily"}},"tavily-gateway":{"metadata":{"category":"Search","description":"Web search and research capabilities powered by Tavily"}}}", + "VITE_APP_MFA_ENABLED": "false", "VITE_APP_MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", "VITE_APP_MODEL_REGION": "us-east-1", "VITE_APP_OPTIMIZE_PROMPT_FUNCTION_ARN": { @@ -19779,6 +19780,7 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 6`] = ` ], "EmailVerificationMessage": "The verification code to your new account is {####}", "EmailVerificationSubject": "Verify your new account", + "MfaConfiguration": "OFF", "Policies": { "PasswordPolicy": { "MinimumLength": 8, @@ -24426,6 +24428,21275 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 7`] = ` } `; +exports[`GenerativeAiUseCases matches the snapshot (mfa enabled) 1`] = ` +{ + "Outputs": { + "ExportsOutputFnGetAttWebAclCloudFrontWafStackWebAclWebAclCloudFrontWafStackAC643995Arn2B4CD922": { + "Export": { + "Name": "CloudFrontWafStack:ExportsOutputFnGetAttWebAclCloudFrontWafStackWebAclWebAclCloudFrontWafStackAC643995Arn2B4CD922", + }, + "Value": { + "Fn::GetAtt": [ + "WebAclCloudFrontWafStackWebAclWebAclCloudFrontWafStackAC643995", + "Arn", + ], + }, + }, + "WebAclId": { + "Value": { + "Fn::GetAtt": [ + "WebAclCloudFrontWafStackWebAclWebAclCloudFrontWafStackAC643995", + "Arn", + ], + }, + }, + }, + "Parameters": { + "BootstrapVersion": { + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", + "Type": "AWS::SSM::Parameter::Value", + }, + }, + "Resources": { + "WebAclCloudFrontWafStackWebAclWebAclCloudFrontWafStackAC643995": { + "Properties": { + "DefaultAction": { + "Block": {}, + }, + "Name": "WebAcl-CloudFrontWafStackWebAclCloudFrontWafStackD5ED98FA", + "Rules": [ + { + "Action": { + "Allow": {}, + }, + "Name": "GeoMatchRuleWebAclCloudFrontWafStack", + "Priority": 3, + "Statement": { + "GeoMatchStatement": { + "CountryCodes": [ + "JP", + ], + }, + }, + "VisibilityConfig": { + "CloudWatchMetricsEnabled": true, + "MetricName": "GeoMatchRuleWebAclCloudFrontWafStack", + "SampledRequestsEnabled": true, + }, + }, + ], + "Scope": "CLOUDFRONT", + "VisibilityConfig": { + "CloudWatchMetricsEnabled": true, + "MetricName": "WebAcl-CloudFrontWafStackWebAclCloudFrontWafStackD5ED98FA", + "SampledRequestsEnabled": true, + }, + }, + "Type": "AWS::WAFv2::WebACL", + }, + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5", + ], + { + "Ref": "BootstrapVersion", + }, + ], + }, + ], + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.", + }, + ], + }, + }, +} +`; + +exports[`GenerativeAiUseCases matches the snapshot (mfa enabled) 2`] = ` +{ + "Outputs": { + "ExportsOutputRefDataSourceBucket9FA93E04BB6984D1": { + "Export": { + "Name": "RagKnowledgeBaseStack:ExportsOutputRefDataSourceBucket9FA93E04BB6984D1", + }, + "Value": { + "Ref": "DataSourceBucket9FA93E04", + }, + }, + "ExportsOutputRefKnowledgeBaseD054384B": { + "Export": { + "Name": "RagKnowledgeBaseStack:ExportsOutputRefKnowledgeBaseD054384B", + }, + "Value": { + "Ref": "KnowledgeBase", + }, + }, + }, + "Parameters": { + "BootstrapVersion": { + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", + "Type": "AWS::SSM::Parameter::Value", + }, + }, + "Resources": { + "AccessPolicy": { + "Properties": { + "Name": "generative-ai-use-cases-jp", + "Policy": { + "Fn::Join": [ + "", + [ + "[{"Rules":[{"Resource":["collection/generative-ai-use-cases-jp"],"Permission":["aoss:DescribeCollectionItems","aoss:CreateCollectionItems","aoss:UpdateCollectionItems"],"ResourceType":"collection"},{"Resource":["index/generative-ai-use-cases-jp/*"],"Permission":["aoss:UpdateIndex","aoss:DescribeIndex","aoss:ReadDocument","aoss:WriteDocument","aoss:CreateIndex","aoss:DeleteIndex"],"ResourceType":"index"}],"Principal":["", + { + "Fn::GetAtt": [ + "KnowledgeBaseRoleA2B317B9", + "Arn", + ], + }, + "","", + { + "Fn::GetAtt": [ + "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734DServiceRole367CC992", + "Arn", + ], + }, + ""],"Description":""}]", + ], + ], + }, + "Type": "data", + }, + "Type": "AWS::OpenSearchServerless::AccessPolicy", + }, + "ApplyTags": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "Collection", + ], + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01E87E9E73", + "Arn", + ], + }, + "accountId": "123456890123", + "collectionId": { + "Ref": "Collection", + }, + "region": "us-east-1", + "tag": { + "key": "GenU", + "value": "", + }, + }, + "Type": "Custom::ApplyTags", + "UpdateReplacePolicy": "Delete", + }, + "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01E87E9E73": { + "DependsOn": [ + "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01ServiceRoleDefaultPolicy0493DEDD", + "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01ServiceRole61085692", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Handler": "apply-tags.handler", + "Role": { + "Fn::GetAtt": [ + "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01ServiceRole61085692", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 300, + }, + "Type": "AWS::Lambda::Function", + }, + "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01ServiceRole61085692": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01ServiceRoleDefaultPolicy0493DEDD": { + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "aoss:TagResource", + "aoss:UntagResource", + "aoss:ListTagsForResource", + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:aoss:us-east-1:123456890123:collection/", + { + "Ref": "Collection", + }, + ], + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01ServiceRoleDefaultPolicy0493DEDD", + "Roles": [ + { + "Ref": "ApplyTagsToResourcesE2488E36B4654D1F9D1C89FB99F1CC01ServiceRole61085692", + }, + ], + }, + "Type": "AWS::IAM::Policy", + }, + "Collection": { + "DependsOn": [ + "AccessPolicy", + "EncryptionPolicy", + "NetworkPolicy", + ], + "Properties": { + "Description": "GenU Collection", + "Name": "generative-ai-use-cases-jp", + "StandbyReplicas": "DISABLED", + "Type": "VECTORSEARCH", + }, + "Type": "AWS::OpenSearchServerless::Collection", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBB049752D": { + "DependsOn": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRoleDefaultPolicy0801355D", + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRole739949D8", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + }, + }, + "Handler": "index.handler", + "Layers": [ + { + "Ref": "DeployDocsAwsCliLayer98E5B499", + }, + ], + "MemorySize": 1024, + "Role": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRole739949D8", + "Arn", + ], + }, + "Runtime": "python3.13", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRole739949D8": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRoleDefaultPolicy0801355D": { + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DataSourceBucket9FA93E04", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DataSourceBucket9FA93E04", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRoleDefaultPolicy0801355D", + "Roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRole739949D8", + }, + ], + }, + "Type": "AWS::IAM::Policy", + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "DataSourceAccessLogsBucketE5273C2E", + }, + " S3 bucket.", + ], + ], + }, + "Handler": "index.handler", + "MemorySize": 128, + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:\${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + "DataSource": { + "Properties": { + "DataSourceConfiguration": { + "S3Configuration": { + "BucketArn": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DataSourceBucket9FA93E04", + }, + ], + ], + }, + "InclusionPrefixes": [ + "docs/", + ], + }, + "Type": "S3", + }, + "KnowledgeBaseId": { + "Ref": "KnowledgeBase", + }, + "Name": "s3-data-source", + "VectorIngestionConfiguration": {}, + }, + "Type": "AWS::Bedrock::DataSource", + }, + "DataSourceAccessLogsBucketAutoDeleteObjectsCustomResourceB4DAFB7C": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "DataSourceAccessLogsBucketPolicy6B5E758D", + ], + "Properties": { + "BucketName": { + "Ref": "DataSourceAccessLogsBucketE5273C2E", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "DataSourceAccessLogsBucketE5273C2E": { + "DeletionPolicy": "Delete", + "Properties": { + "AccessControl": "LogDeliveryWrite", + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "ObjectWriter", + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "DataSourceAccessLogsBucketPolicy6B5E758D": { + "Properties": { + "Bucket": { + "Ref": "DataSourceAccessLogsBucketE5273C2E", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "DataSourceAccessLogsBucketE5273C2E", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DataSourceAccessLogsBucketE5273C2E", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "DataSourceAccessLogsBucketE5273C2E", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DataSourceAccessLogsBucketE5273C2E", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + }, + "DataSourceBucket9FA93E04": { + "DeletionPolicy": "Delete", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "LoggingConfiguration": { + "DestinationBucketName": { + "Ref": "DataSourceAccessLogsBucketE5273C2E", + }, + "LogFilePrefix": "AccessLogs/", + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "ObjectWriter", + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + { + "Key": "aws-cdk:cr-owned:af230d0d", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "DataSourceBucketAutoDeleteObjectsCustomResourceE8C6F6B1": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "DataSourceBucketPolicy817DBB38", + ], + "Properties": { + "BucketName": { + "Ref": "DataSourceBucket9FA93E04", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "DataSourceBucketPolicy817DBB38": { + "Properties": { + "Bucket": { + "Ref": "DataSourceBucket9FA93E04", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "DataSourceBucket9FA93E04", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DataSourceBucket9FA93E04", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "DataSourceBucket9FA93E04", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DataSourceBucket9FA93E04", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + }, + "DeployDocsAwsCliLayer98E5B499": { + "Properties": { + "Content": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": "/opt/awscli/aws", + }, + "Type": "AWS::Lambda::LayerVersion", + }, + "DeployDocsCustomResource1024MiB91B30E63": { + "DeletionPolicy": "Delete", + "Properties": { + "DestinationBucketName": { + "Ref": "DataSourceBucket9FA93E04", + }, + "Exclude": [ + "AccessLogs/*", + "logs*", + ], + "OutputObjectKeys": true, + "Prune": false, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBB049752D", + "Arn", + ], + }, + "SourceBucketNames": [ + "cdk-hnb659fds-assets-123456890123-us-east-1", + ], + "SourceObjectKeys": [ + "HASH-REPLACED.zip", + ], + "WaitForDistributionInvalidation": true, + }, + "Type": "Custom::CDKBucketDeployment", + "UpdateReplacePolicy": "Delete", + }, + "EncryptionPolicy": { + "Properties": { + "Name": "generative-ai-use-cases-jp", + "Policy": "{"Rules":[{"Resource":["collection/generative-ai-use-cases-jp"],"ResourceType":"collection"}],"AWSOwnedKey":true}", + "Type": "encryption", + }, + "Type": "AWS::OpenSearchServerless::SecurityPolicy", + }, + "KnowledgeBase": { + "DependsOn": [ + "Collection", + "OssIndexCustomResourceFB9548E5", + ], + "Properties": { + "KnowledgeBaseConfiguration": { + "Type": "VECTOR", + "VectorKnowledgeBaseConfiguration": { + "EmbeddingModelArn": "arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-embed-text-v2:0", + }, + }, + "Name": "generative-ai-use-cases-jp", + "RoleArn": { + "Fn::GetAtt": [ + "KnowledgeBaseRoleA2B317B9", + "Arn", + ], + }, + "StorageConfiguration": { + "OpensearchServerlessConfiguration": { + "CollectionArn": { + "Fn::GetAtt": [ + "Collection", + "Arn", + ], + }, + "FieldMapping": { + "MetadataField": "AMAZON_BEDROCK_METADATA", + "TextField": "AMAZON_BEDROCK_TEXT_CHUNK", + "VectorField": "bedrock-knowledge-base-default-vector", + }, + "VectorIndexName": "bedrock-knowledge-base-default", + }, + "Type": "OPENSEARCH_SERVERLESS", + }, + }, + "Type": "AWS::Bedrock::KnowledgeBase", + }, + "KnowledgeBaseRoleA2B317B9": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "bedrock.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::IAM::Role", + }, + "KnowledgeBaseRoleDefaultPolicyB3F66209": { + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "bedrock:InvokeModel", + "Effect": "Allow", + "Resource": "*", + }, + { + "Action": "aoss:APIAccessAll", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "Collection", + "Arn", + ], + }, + }, + { + "Action": "s3:ListBucket", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DataSourceBucket9FA93E04", + }, + ], + ], + }, + }, + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DataSourceBucket9FA93E04", + }, + "/*", + ], + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "KnowledgeBaseRoleDefaultPolicyB3F66209", + "Roles": [ + { + "Ref": "KnowledgeBaseRoleA2B317B9", + }, + ], + }, + "Type": "AWS::IAM::Policy", + }, + "NetworkPolicy": { + "Properties": { + "Name": "generative-ai-use-cases-jp", + "Policy": "[{"Rules":[{"Resource":["collection/generative-ai-use-cases-jp"],"ResourceType":"collection"},{"Resource":["collection/generative-ai-use-cases-jp"],"ResourceType":"dashboard"}],"AllowFromPublic":true}]", + "Type": "network", + }, + "Type": "AWS::OpenSearchServerless::SecurityPolicy", + }, + "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734D5A536997": { + "DependsOn": [ + "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734DServiceRoleDefaultPolicy4DF6601A", + "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734DServiceRole367CC992", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Handler": "oss-index.handler", + "Role": { + "Fn::GetAtt": [ + "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734DServiceRole367CC992", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + }, + "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734DServiceRole367CC992": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734DServiceRoleDefaultPolicy4DF6601A": { + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "aoss:APIAccessAll", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "Collection", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734DServiceRoleDefaultPolicy4DF6601A", + "Roles": [ + { + "Ref": "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734DServiceRole367CC992", + }, + ], + }, + "Type": "AWS::IAM::Policy", + }, + "OssIndexCustomResourceFB9548E5": { + "DeletionPolicy": "Delete", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "OpenSearchServerlessIndex339C5FEDA1B543B6B40A5E8E59E5734D5A536997", + "Arn", + ], + }, + "collectionId": { + "Ref": "Collection", + }, + "metadataField": "AMAZON_BEDROCK_METADATA", + "ragKnowledgeBaseBinaryVector": false, + "textField": "AMAZON_BEDROCK_TEXT_CHUNK", + "vectorDimension": "1024", + "vectorField": "bedrock-knowledge-base-default-vector", + "vectorIndexName": "bedrock-knowledge-base-default", + }, + "Type": "Custom::OssIndex", + "UpdateReplacePolicy": "Delete", + }, + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5", + ], + { + "Ref": "BootstrapVersion", + }, + ], + }, + ], + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.", + }, + ], + }, + }, +} +`; + +exports[`GenerativeAiUseCases matches the snapshot (mfa enabled) 3`] = ` +{ + "Outputs": { + "Agents": { + "Value": { + "Fn::Join": [ + "", + [ + "[{"displayName":"SearchEngine","agentId":"", + { + "Fn::GetAtt": [ + "AgentSearchAgent3AF6EC6F", + "AgentId", + ], + }, + "","aliasId":"", + { + "Fn::GetAtt": [ + "AgentSearchAgentAliasD59C2A47", + "AgentAliasId", + ], + }, + "","description":"Agent with Web Search Functionality"},{"displayName":"CodeInterpreter","agentId":"", + { + "Fn::GetAtt": [ + "AgentCodeInterpreterAgent98889BFE", + "AgentId", + ], + }, + "","aliasId":"", + { + "Fn::GetAtt": [ + "AgentCodeInterpreterAgentAliasB6F54C31", + "AgentAliasId", + ], + }, + "","description":"Agent with Code Interpreter Functionality"}]", + ], + ], + }, + }, + }, + "Parameters": { + "BootstrapVersion": { + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", + "Type": "AWS::SSM::Parameter::Value", + }, + }, + "Resources": { + "AgentApiSchemaBucketAwsCliLayer2C3ACF8A": { + "Properties": { + "Content": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": "/opt/awscli/aws", + }, + "Type": "AWS::Lambda::LayerVersion", + }, + "AgentApiSchemaBucketCustomResource1D7C4CC4": { + "DeletionPolicy": "Delete", + "Properties": { + "DestinationBucketArn": { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + "DestinationBucketKeyPrefix": "api-schema", + "DestinationBucketName": { + "Ref": "AgentBucket77F66FF4", + }, + "OutputObjectKeys": true, + "Prune": true, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536", + "Arn", + ], + }, + "SourceBucketNames": [ + "cdk-hnb659fds-assets-123456890123-us-east-1", + ], + "SourceObjectKeys": [ + "HASH-REPLACED.zip", + ], + "WaitForDistributionInvalidation": true, + }, + "Type": "Custom::CDKBucketDeployment", + "UpdateReplacePolicy": "Delete", + }, + "AgentBedrockAgentLambda3510C7EB": { + "DependsOn": [ + "AgentBedrockAgentLambdaServiceRole91E15FC7", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "SEARCH_API_KEY": "XXXXXX", + "SEARCH_ENGINE": "Brave", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "AgentBedrockAgentLambdaServiceRole91E15FC7", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 300, + }, + "Type": "AWS::Lambda::Function", + }, + "AgentBedrockAgentLambdaInvokeu1TDdDMoLpes23omAp0kUXOcNSkFsO0n9KPkoXL68FBA4836E": { + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "AgentBedrockAgentLambda3510C7EB", + "Arn", + ], + }, + "Principal": "bedrock.amazonaws.com", + }, + "Type": "AWS::Lambda::Permission", + }, + "AgentBedrockAgentLambdaServiceRole91E15FC7": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + "AgentBedrockAgentRole5FEB7025": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "bedrock.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "*", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "BedrockAgentS3BucketPolicy", + }, + { + "PolicyDocument": { + "Statement": [ + { + "Action": "bedrock:*", + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "BedrockAgentBedrockModelPolicy", + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + "AgentBucket77F66FF4": { + "DeletionPolicy": "Delete", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + { + "Key": "aws-cdk:cr-owned:api-schema:b7d6a79e", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "AgentBucketAutoDeleteObjectsCustomResourceBD94B538": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AgentBucketPolicy37E1CD3C", + ], + "Properties": { + "BucketName": { + "Ref": "AgentBucket77F66FF4", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "AgentBucketPolicy37E1CD3C": { + "Properties": { + "Bucket": { + "Ref": "AgentBucket77F66FF4", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + }, + "AgentCodeInterpreterAgent98889BFE": { + "Properties": { + "ActionGroups": [ + { + "ActionGroupName": "CodeInterpreter", + "ParentActionGroupSignature": "AMAZON.CodeInterpreter", + }, + ], + "AgentName": "CodeInterpreterAgent-WebSearchAgentStackAgent49BCEDE6", + "AgentResourceRoleArn": { + "Fn::GetAtt": [ + "AgentBedrockAgentRole5FEB7025", + "Arn", + ], + }, + "AutoPrepare": true, + "Description": "Code Interpreter", + "FoundationModel": "us.anthropic.claude-3-5-sonnet-20241022-v2:0", + "IdleSessionTTLInSeconds": 3600, + "Instruction": "You are an advanced AI agent with the ability to execute code, generate charts, and perform complex data analysis. +Your main function is to solve problems and meet user requests by utilizing these capabilities. +Your main characteristics and instructions are as follows. + +Code Execution: +- Access the Python environment in real time to write and run code. +- When asked to perform calculations or data operations, always use this code execution feature to ensure accuracy. +- After running the code, report the exact output and explain the results. + +Data Analysis: +- You are excellent at statistical analysis, data visualization, machine learning applications, and other complex data analysis tasks. +- Understand the problem, prepare the data, perform the analysis, and interpret the results systematically. + +Problem Solving Approach: +- When a problem or request is presented, break it down into steps. +- Clearly communicate the process and steps taken. +- If a task requires multiple steps or tools, outline the approach before starting. + +Transparency and Accuracy: +- Always clarify what you are doing. If you are executing code, inform the user. If you are generating an image, explain that. +- If you are unsure about something or the task exceeds your capabilities, clearly communicate that. +- Do not present hypothetical results as actual results. Only report actual results from code execution or image generation. + +Dialog Style: +- Provide a concise answer to simple questions and a detailed explanation for complex tasks. +- Use appropriate technical terms, but be prepared to explain in simple terms if requested. +- Actively propose useful related information or alternative approaches. + +Continuous Improvement: +- After completing a task, ask the user if they need an explanation. +- Listen to feedback and adjust the approach accordingly. + +Your goal is to provide support that is accurate and useful by utilizing the unique features of code execution, image generation, and data analysis. +Always strive to provide the most practical and effective solutions to user requests. + +Automatically detect the language of the user's request and think and answer in the same language.", + }, + "Type": "AWS::Bedrock::Agent", + }, + "AgentCodeInterpreterAgentAliasB6F54C31": { + "Properties": { + "AgentAliasName": "v1", + "AgentId": { + "Fn::GetAtt": [ + "AgentCodeInterpreterAgent98889BFE", + "AgentId", + ], + }, + }, + "Type": "AWS::Bedrock::AgentAlias", + }, + "AgentSearchAgent3AF6EC6F": { + "Properties": { + "ActionGroups": [ + { + "ActionGroupExecutor": { + "Lambda": { + "Fn::GetAtt": [ + "AgentBedrockAgentLambda3510C7EB", + "Arn", + ], + }, + }, + "ActionGroupName": "Search", + "ApiSchema": { + "S3": { + "S3BucketName": { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "AgentApiSchemaBucketCustomResource1D7C4CC4", + "DestinationBucketArn", + ], + }, + ], + }, + ], + }, + ], + }, + ], + }, + "S3ObjectKey": "api-schema/api-schema.json", + }, + }, + "Description": "Search", + }, + { + "ActionGroupName": "UserInputAction", + "ParentActionGroupSignature": "AMAZON.UserInput", + }, + ], + "AgentName": "SearchEngineAgent-WebSearchAgentStackAgent49BCEDE6", + "AgentResourceRoleArn": { + "Fn::GetAtt": [ + "AgentBedrockAgentRole5FEB7025", + "Arn", + ], + }, + "AutoPrepare": true, + "Description": "Agent with Web Search Functionality", + "FoundationModel": "us.anthropic.claude-3-5-sonnet-20241022-v2:0", + "IdleSessionTTLInSeconds": 3600, + "Instruction": "You are an advanced assistant with the ability to search and retrieve information from the web to perform complex research tasks. +Your main function is to solve problems and meet user requests by utilizing these capabilities. +Your main characteristics and instructions are as follows. + +- Understand the user's request and construct hypothesis on research strategy. If the user's request is not clear, ask the user for more information. +- Think right search keywords to retrieve information relevant to the user's request. +- Search the web for information relevant to the user's request. +- Retrieve information from the web to answer the user's request. +- If the information needed to respond to the instruction is sufficient, answer immediately. +- If the information is insufficient, revise research strategy and collect more information. +- Multiple searches are possible. You can search up to 5 times. + +Automatically detect the language of the user's request and think and answer in the same language.", + }, + "Type": "AWS::Bedrock::Agent", + }, + "AgentSearchAgentAliasD59C2A47": { + "Properties": { + "AgentAliasName": "v1", + "AgentId": { + "Fn::GetAtt": [ + "AgentSearchAgent3AF6EC6F", + "AgentId", + ], + }, + }, + "Type": "AWS::Bedrock::AgentAlias", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536": { + "DependsOn": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + }, + }, + "Handler": "index.handler", + "Layers": [ + { + "Ref": "AgentApiSchemaBucketAwsCliLayer2C3ACF8A", + }, + ], + "Role": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", + "Arn", + ], + }, + "Runtime": "python3.13", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF": { + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AgentBucket77F66FF4", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRoleDefaultPolicy88902FDF", + "Roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265", + }, + ], + }, + "Type": "AWS::IAM::Policy", + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "AgentBucket77F66FF4", + }, + " S3 bucket.", + ], + ], + }, + "Handler": "index.handler", + "MemorySize": 128, + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:\${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5", + ], + { + "Ref": "BootstrapVersion", + }, + ], + }, + ], + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.", + }, + ], + }, + }, +} +`; + +exports[`GenerativeAiUseCases matches the snapshot (mfa enabled) 4`] = ` +{ + "Outputs": { + "AgentBuilderAgentCoreRuntimeArn": { + "Value": { + "Fn::GetAtt": [ + "GenericAgentCoreAgentBuilderAgentCoreRuntimeFEFD60E0", + "AgentRuntimeArn", + ], + }, + }, + "AgentBuilderAgentCoreRuntimeName": { + "Value": "GenUAgentBuilderRuntime", + }, + "ExportsOutputRefGenericAgentCoreAgentCoreFileBucket0430DA423298A79F": { + "Export": { + "Name": "AgentCoreStack:ExportsOutputRefGenericAgentCoreAgentCoreFileBucket0430DA423298A79F", + }, + "Value": { + "Ref": "GenericAgentCoreAgentCoreFileBucket0430DA42", + }, + }, + "FileBucketName": { + "Value": { + "Ref": "GenericAgentCoreAgentCoreFileBucket0430DA42", + }, + }, + "GenericAgentCoreRuntimeArn": { + "Value": { + "Fn::GetAtt": [ + "GenericAgentCoreGenericAgentCoreRuntime041F933D", + "AgentRuntimeArn", + ], + }, + }, + "GenericAgentCoreRuntimeName": { + "Value": "GenUGenericRuntime", + }, + }, + "Parameters": { + "BootstrapVersion": { + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", + "Type": "AWS::SSM::Parameter::Value", + }, + }, + "Resources": { + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "GenericAgentCoreAgentCoreFileBucket0430DA42", + }, + " S3 bucket.", + ], + ], + }, + "Handler": "index.handler", + "MemorySize": 128, + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:\${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + }, + ], + }, + "Type": "AWS::IAM::Role", + }, + "GenericAgentCoreAgentBuilderAgentCoreRuntimeFEFD60E0": { + "DependsOn": [ + "GenericAgentCoreAgentCoreRuntimeRoleDefaultPolicy4E847841", + "GenericAgentCoreAgentCoreRuntimeRoleF34B80EA", + ], + "Properties": { + "AgentRuntimeArtifact": { + "ContainerConfiguration": { + "ContainerUri": { + "Fn::Sub": "123456890123.dkr.ecr.us-east-1.\${AWS::URLSuffix}/cdk-hnb659fds-container-assets-123456890123-us-east-1:269f4f4a951791e332d743bff1e6d6850b8c4702c14f0c17086d0fb9a616a782", + }, + }, + }, + "AgentRuntimeName": "GenUAgentBuilderRuntime", + "EnvironmentVariables": { + "FILE_BUCKET": { + "Ref": "GenericAgentCoreAgentCoreFileBucket0430DA42", + }, + "MCP_CONFIG_PATH": "/var/task/mcp-configs/agent-builder/mcp.json", + "SUPPORTED_CACHE_FIELDS": "{"anthropic.claude-opus-4-5-20251101-v1:0":["messages","system","tools"],"anthropic.claude-sonnet-4-5-20250929-v1:0":["messages","system","tools"],"anthropic.claude-haiku-4-5-20251001-v1:0":["messages","system","tools"],"anthropic.claude-opus-4-1-20250805-v1:0":["messages","system","tools"],"anthropic.claude-opus-4-20250514-v1:0":["messages","system","tools"],"anthropic.claude-sonnet-4-20250514-v1:0":["messages","system","tools"],"anthropic.claude-3-7-sonnet-20250219-v1:0":["messages","system","tools"],"anthropic.claude-3-5-haiku-20241022-v1:0":["messages","system","tools"],"amazon.nova-premier-v1:0":["messages","system"],"amazon.nova-pro-v1:0":["messages","system"],"amazon.nova-lite-v1:0":["messages","system"],"amazon.nova-micro-v1:0":["messages","system"],"amazon.nova-2-lite-v1:0":["messages","system"]}", + }, + "NetworkConfiguration": { + "NetworkMode": "PUBLIC", + }, + "ProtocolConfiguration": "HTTP", + "RoleArn": { + "Fn::GetAtt": [ + "GenericAgentCoreAgentCoreRuntimeRoleF34B80EA", + "Arn", + ], + }, + }, + "Type": "AWS::BedrockAgentCore::Runtime", + }, + "GenericAgentCoreAgentCoreFileBucket0430DA42": { + "DeletionPolicy": "Delete", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "GenericAgentCoreAgentCoreFileBucketAutoDeleteObjectsCustomResourceC1B4B54D": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "GenericAgentCoreAgentCoreFileBucketPolicyB659200A", + ], + "Properties": { + "BucketName": { + "Ref": "GenericAgentCoreAgentCoreFileBucket0430DA42", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "GenericAgentCoreAgentCoreFileBucketPolicyB659200A": { + "Properties": { + "Bucket": { + "Ref": "GenericAgentCoreAgentCoreFileBucket0430DA42", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "GenericAgentCoreAgentCoreFileBucket0430DA42", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "GenericAgentCoreAgentCoreFileBucket0430DA42", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + }, + "GenericAgentCoreAgentCoreRuntimeRoleDefaultPolicy4E847841": { + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:DescribeLogStreams", + "logs:CreateLogGroup", + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":logs:us-east-1:123456890123:log-group:/aws/bedrock-agentcore/runtimes/*", + ], + ], + }, + "Sid": "LogGroupAccess", + }, + { + "Action": "logs:DescribeLogGroups", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":logs:us-east-1:123456890123:log-group:*", + ], + ], + }, + "Sid": "DescribeLogGroups", + }, + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents", + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":logs:us-east-1:123456890123:log-group:/aws/bedrock-agentcore/runtimes/*:log-stream:*", + ], + ], + }, + "Sid": "LogStreamAccess", + }, + { + "Action": [ + "xray:PutTraceSegments", + "xray:PutTelemetryRecords", + "xray:GetSamplingRules", + "xray:GetSamplingTargets", + ], + "Effect": "Allow", + "Resource": "*", + "Sid": "XRayAccess", + }, + { + "Action": "cloudwatch:PutMetricData", + "Condition": { + "StringEquals": { + "cloudwatch:namespace": "bedrock-agentcore", + }, + }, + "Effect": "Allow", + "Resource": "*", + "Sid": "CloudWatchMetrics", + }, + { + "Action": [ + "bedrock-agentcore:GetWorkloadAccessToken", + "bedrock-agentcore:GetWorkloadAccessTokenForJWT", + "bedrock-agentcore:GetWorkloadAccessTokenForUserId", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":bedrock-agentcore:us-east-1:123456890123:workload-identity-directory/default", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":bedrock-agentcore:us-east-1:123456890123:workload-identity-directory/default/workload-identity/*", + ], + ], + }, + ], + "Sid": "GetAgentAccessToken", + }, + { + "Action": [ + "bedrock:InvokeModel", + "bedrock:InvokeModelWithResponseStream", + ], + "Effect": "Allow", + "Resource": "*", + "Sid": "BedrockModelInvocation", + }, + { + "Action": "iam:CreateServiceLinkedRole", + "Condition": { + "StringEquals": { + "iam:AWSServiceName": "runtime-identity.bedrock-agentcore.amazonaws.com", + }, + }, + "Effect": "Allow", + "Resource": "arn:aws:iam::*:role/aws-service-role/runtime-identity.bedrock-agentcore.amazonaws.com/AWSServiceRoleForBedrockAgentCoreRuntimeIdentity", + "Sid": "CreateServiceLinkedRole", + }, + { + "Action": [ + "bedrock-agentcore:CreateCodeInterpreter", + "bedrock-agentcore:StartCodeInterpreterSession", + "bedrock-agentcore:InvokeCodeInterpreter", + "bedrock-agentcore:StopCodeInterpreterSession", + "bedrock-agentcore:DeleteCodeInterpreter", + "bedrock-agentcore:ListCodeInterpreters", + "bedrock-agentcore:GetCodeInterpreter", + "bedrock-agentcore:GetCodeInterpreterSession", + "bedrock-agentcore:ListCodeInterpreterSessions", + ], + "Effect": "Allow", + "Resource": "*", + "Sid": "Tools", + }, + { + "Action": "bedrock-agentcore:InvokeGateway", + "Effect": "Allow", + "Resource": "*", + "Sid": "AllowGatewayInvocation", + }, + { + "Action": [ + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "GenericAgentCoreAgentCoreFileBucket0430DA42", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "GenericAgentCoreAgentCoreFileBucket0430DA42", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "ecr:BatchCheckLayerAvailability", + "ecr:GetDownloadUrlForLayer", + "ecr:BatchGetImage", + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":ecr:us-east-1:123456890123:repository/cdk-hnb659fds-container-assets-123456890123-us-east-1", + ], + ], + }, + }, + { + "Action": "ecr:GetAuthorizationToken", + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "GenericAgentCoreAgentCoreRuntimeRoleDefaultPolicy4E847841", + "Roles": [ + { + "Ref": "GenericAgentCoreAgentCoreRuntimeRoleF34B80EA", + }, + ], + }, + "Type": "AWS::IAM::Policy", + }, + "GenericAgentCoreAgentCoreRuntimeRoleF34B80EA": { + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Condition": { + "ArnLike": { + "aws:SourceArn": "arn:aws:bedrock-agentcore:us-east-1:123456890123:*", + }, + "StringEquals": { + "aws:SourceAccount": "123456890123", + }, + }, + "Effect": "Allow", + "Principal": { + "Service": "bedrock-agentcore.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::IAM::Role", + }, + "GenericAgentCoreGenericAgentCoreRuntime041F933D": { + "DependsOn": [ + "GenericAgentCoreAgentCoreRuntimeRoleDefaultPolicy4E847841", + "GenericAgentCoreAgentCoreRuntimeRoleF34B80EA", + ], + "Properties": { + "AgentRuntimeArtifact": { + "ContainerConfiguration": { + "ContainerUri": { + "Fn::Sub": "123456890123.dkr.ecr.us-east-1.\${AWS::URLSuffix}/cdk-hnb659fds-container-assets-123456890123-us-east-1:269f4f4a951791e332d743bff1e6d6850b8c4702c14f0c17086d0fb9a616a782", + }, + }, + }, + "AgentRuntimeName": "GenUGenericRuntime", + "EnvironmentVariables": { + "FILE_BUCKET": { + "Ref": "GenericAgentCoreAgentCoreFileBucket0430DA42", + }, + "MCP_CONFIG_PATH": "/var/task/mcp-configs/generic/mcp.json", + "SUPPORTED_CACHE_FIELDS": "{"anthropic.claude-opus-4-5-20251101-v1:0":["messages","system","tools"],"anthropic.claude-sonnet-4-5-20250929-v1:0":["messages","system","tools"],"anthropic.claude-haiku-4-5-20251001-v1:0":["messages","system","tools"],"anthropic.claude-opus-4-1-20250805-v1:0":["messages","system","tools"],"anthropic.claude-opus-4-20250514-v1:0":["messages","system","tools"],"anthropic.claude-sonnet-4-20250514-v1:0":["messages","system","tools"],"anthropic.claude-3-7-sonnet-20250219-v1:0":["messages","system","tools"],"anthropic.claude-3-5-haiku-20241022-v1:0":["messages","system","tools"],"amazon.nova-premier-v1:0":["messages","system"],"amazon.nova-pro-v1:0":["messages","system"],"amazon.nova-lite-v1:0":["messages","system"],"amazon.nova-micro-v1:0":["messages","system"],"amazon.nova-2-lite-v1:0":["messages","system"]}", + }, + "NetworkConfiguration": { + "NetworkMode": "PUBLIC", + }, + "ProtocolConfiguration": "HTTP", + "RoleArn": { + "Fn::GetAtt": [ + "GenericAgentCoreAgentCoreRuntimeRoleF34B80EA", + "Arn", + ], + }, + }, + "Type": "AWS::BedrockAgentCore::Runtime", + }, + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5", + ], + { + "Ref": "BootstrapVersion", + }, + ], + }, + ], + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.", + }, + ], + }, + }, +} +`; + +exports[`GenerativeAiUseCases matches the snapshot (mfa enabled) 5`] = ` +{ + "Outputs": { + "ExportsOutputFnGetAttGuardrailguardrail03A76CF4GuardrailIdDBA991AF": { + "Export": { + "Name": "GuardrailStack:ExportsOutputFnGetAttGuardrailguardrail03A76CF4GuardrailIdDBA991AF", + }, + "Value": { + "Fn::GetAtt": [ + "Guardrailguardrail03A76CF4", + "GuardrailId", + ], + }, + }, + }, + "Parameters": { + "BootstrapVersion": { + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", + "Type": "AWS::SSM::Parameter::Value", + }, + }, + "Resources": { + "Guardrailguardrail03A76CF4": { + "Properties": { + "BlockedInputMessaging": "Detected blocked input. Please start the conversation from the beginning or contact the administrator.", + "BlockedOutputsMessaging": "Detected output that is prohibited. Please start the conversation from the beginning or contact the administrator.", + "Name": "Guardrail-GuardrailStackGuardrail9A24D506", + "SensitiveInformationPolicyConfig": { + "PiiEntitiesConfig": [ + { + "Action": "BLOCK", + "Type": "AGE", + }, + { + "Action": "BLOCK", + "Type": "AWS_ACCESS_KEY", + }, + { + "Action": "BLOCK", + "Type": "AWS_SECRET_KEY", + }, + { + "Action": "BLOCK", + "Type": "CREDIT_DEBIT_CARD_CVV", + }, + { + "Action": "BLOCK", + "Type": "CREDIT_DEBIT_CARD_EXPIRY", + }, + { + "Action": "BLOCK", + "Type": "CREDIT_DEBIT_CARD_NUMBER", + }, + { + "Action": "BLOCK", + "Type": "EMAIL", + }, + { + "Action": "BLOCK", + "Type": "INTERNATIONAL_BANK_ACCOUNT_NUMBER", + }, + { + "Action": "BLOCK", + "Type": "IP_ADDRESS", + }, + { + "Action": "BLOCK", + "Type": "LICENSE_PLATE", + }, + { + "Action": "BLOCK", + "Type": "MAC_ADDRESS", + }, + { + "Action": "BLOCK", + "Type": "PASSWORD", + }, + { + "Action": "BLOCK", + "Type": "PHONE", + }, + { + "Action": "BLOCK", + "Type": "PIN", + }, + { + "Action": "BLOCK", + "Type": "SWIFT_CODE", + }, + { + "Action": "BLOCK", + "Type": "URL", + }, + { + "Action": "BLOCK", + "Type": "USERNAME", + }, + ], + }, + }, + "Type": "AWS::Bedrock::Guardrail", + }, + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5", + ], + { + "Ref": "BootstrapVersion", + }, + ], + }, + ], + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.", + }, + ], + }, + }, +} +`; + +exports[`GenerativeAiUseCases matches the snapshot (mfa enabled) 6`] = ` +{ + "Description": "Generative AI Use Cases (uksb-1tupboc48)", + "Outputs": { + "APIApiEndpoint036547C6": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "APIApiFFA96F67", + }, + ".execute-api.us-east-1.", + { + "Ref": "AWS::URLSuffix", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/", + ], + ], + }, + }, + "AgentCoreAgentBuilderEnabled": { + "Value": "true", + }, + "AgentCoreAgentBuilderRuntime": { + "Value": { + "Fn::Join": [ + "", + [ + "{"name":"", + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "AgentBuilderAgentCoreRuntimeName", + ], + }, + "","arn":"", + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "AgentBuilderAgentCoreRuntimeArn", + ], + }, + ""}", + ], + ], + }, + }, + "AgentCoreEnabled": { + "Value": "true", + }, + "AgentCoreExternalRuntimes": { + "Value": "[]", + }, + "AgentCoreGenericRuntime": { + "Value": { + "Fn::Join": [ + "", + [ + "{"name":"", + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "GenericAgentCoreRuntimeName", + ], + }, + "","arn":"", + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "GenericAgentCoreRuntimeArn", + ], + }, + ""}", + ], + ], + }, + }, + "AgentEnabled": { + "Value": "true", + }, + "Agents": { + "Value": "W10=", + }, + "ApiEndpoint": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "APIApiFFA96F67", + }, + ".execute-api.us-east-1.", + { + "Ref": "AWS::URLSuffix", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/", + ], + ], + }, + }, + "EndpointNames": { + "Value": "[]", + }, + "ExportsOutputRefAuthUserPool8115E87F4F9C6D4C": { + "Export": { + "Name": "GenerativeAiUseCasesStack:ExportsOutputRefAuthUserPool8115E87F4F9C6D4C", + }, + "Value": { + "Ref": "AuthUserPool8115E87F", + }, + }, + "ExportsOutputRefAuthUserPoolclientA74673A913CB5D33": { + "Export": { + "Name": "GenerativeAiUseCasesStack:ExportsOutputRefAuthUserPoolclientA74673A913CB5D33", + }, + "Value": { + "Ref": "AuthUserPoolclientA74673A9", + }, + }, + "Flows": { + "Value": "W10=", + }, + "HiddenUseCases": { + "Value": "{}", + }, + "IdPoolId": { + "Value": { + "Ref": "AuthIdentityPool659E7F64", + }, + }, + "ImageGenerateModelIds": { + "Value": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + }, + "InlineAgents": { + "Value": "false", + }, + "InvokeFlowFunctionArn": { + "Value": { + "Fn::GetAtt": [ + "APIInvokeFlow03786D76", + "Arn", + ], + }, + }, + "McpEnabled": { + "Value": "false", + }, + "McpEndpoint": { + "Value": "", + }, + "McpServersConfig": { + "Value": "{"time":{"metadata":{"category":"Utility","description":"Provides current time and date functionality"}},"aws-knowledge-mcp-server":{"metadata":{"category":"AWS","description":"AWS Knowledge Base MCP server for enterprise knowledge access"}},"awslabs.aws-documentation-mcp-server":{"metadata":{"category":"AWS","description":"Access AWS documentation and guides"}},"awslabs.cdk-mcp-server":{"metadata":{"category":"AWS","description":"AWS CDK code generation and assistance"}},"awslabs.aws-diagram-mcp-server":{"metadata":{"category":"AWS","description":"Generate AWS architecture diagrams"}},"awslabs.nova-canvas-mcp-server":{"metadata":{"category":"AI/ML","description":"Amazon Nova Canvas image generation"}},"tavily-search":{"metadata":{"category":"Search","description":"Web search and research capabilities powered by Tavily"}},"tavily-gateway":{"metadata":{"category":"Search","description":"Web search and research capabilities powered by Tavily"}}}", + }, + "ModelIds": { + "Value": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + }, + "ModelRegion": { + "Value": "us-east-1", + }, + "OptimizePromptFunctionArn": { + "Value": { + "Fn::GetAtt": [ + "APIOptimizePromptFunctionC14E6D1B", + "Arn", + ], + }, + }, + "PredictStreamFunctionArn": { + "Value": { + "Fn::GetAtt": [ + "APIPredictStream44DDBC25", + "Arn", + ], + }, + }, + "RagEnabled": { + "Value": "true", + }, + "RagKnowledgeBaseEnabled": { + "Value": "true", + }, + "Region": { + "Value": "us-east-1", + }, + "SamlAuthEnabled": { + "Value": "false", + }, + "SamlCognitoDomainName": { + "Value": "", + }, + "SamlCognitoFederatedIdentityProviderName": { + "Value": "", + }, + "SelfSignUpEnabled": { + "Value": "true", + }, + "SpeechToSpeechEventApiEndpoint": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Fn::GetAtt": [ + "SpeechToSpeechEventApi1E2E9AB4", + "Dns.Http", + ], + }, + "/event", + ], + ], + }, + }, + "SpeechToSpeechModelIds": { + "Value": "[{"modelId":"amazon.nova-sonic-v1:0","region":"us-east-1"}]", + }, + "SpeechToSpeechNamespace": { + "Value": "speech-to-speech", + }, + "UseCaseBuilderEnabled": { + "Value": "true", + }, + "UserPoolClientId": { + "Value": { + "Ref": "AuthUserPoolclientA74673A9", + }, + }, + "UserPoolId": { + "Value": { + "Ref": "AuthUserPool8115E87F", + }, + }, + "VideoGenerateModelIds": { + "Value": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + "WebUrl": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Fn::GetAtt": [ + "ApiWebCloudFrontDistributionA115FBC3", + "DomainName", + ], + }, + ], + ], + }, + }, + }, + "Parameters": { + "BootstrapVersion": { + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", + "Type": "AWS::SSM::Parameter::Value", + }, + }, + "Resources": { + "APIApiAccountF2C87424": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIApiFFA96F67", + ], + "Properties": { + "CloudWatchRoleArn": { + "Fn::GetAtt": [ + "APIApiCloudWatchRoleD747A0A6", + "Arn", + ], + }, + }, + "Type": "AWS::ApiGateway::Account", + "UpdateReplacePolicy": "Delete", + }, + "APIApiApi4XXDCF913C8": { + "DeletionPolicy": "Delete", + "Properties": { + "ResponseParameters": { + "gatewayresponse.header.Access-Control-Allow-Origin": "'*'", + }, + "ResponseType": "DEFAULT_4XX", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::GatewayResponse", + "UpdateReplacePolicy": "Delete", + }, + "APIApiApi5XX11B67643": { + "DeletionPolicy": "Delete", + "Properties": { + "ResponseParameters": { + "gatewayresponse.header.Access-Control-Allow-Origin": "'*'", + }, + "ResponseType": "DEFAULT_5XX", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::GatewayResponse", + "UpdateReplacePolicy": "Delete", + }, + "APIApiCloudWatchRoleD747A0A6": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "apigateway.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIApiDeployment3A5021234db71f4ccf16e49a8440e8926bf1f516": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIApiApi4XXDCF913C8", + "APIApiApi5XX11B67643", + "APIApiagentsproxyANY44A4A08E", + "APIApiagentsproxyOPTIONS65C845F9", + "APIApiagentsproxy440913A2", + "APIApiagentsANY50AC6B55", + "APIApiagentsOPTIONS064D2F41", + "APIApiagents70FB378D", + "APIApichatschatIdDELETE4578D41B", + "APIApichatschatIdfeedbacksOPTIONS7AB34AA5", + "APIApichatschatIdfeedbacksPOST3E9ACBEC", + "APIApichatschatIdfeedbacksF371F57A", + "APIApichatschatIdGET152C9123", + "APIApichatschatIdmessagesGET94AB097F", + "APIApichatschatIdmessagesOPTIONS20207E07", + "APIApichatschatIdmessagesPOST4197DA8F", + "APIApichatschatIdmessagesAF527CE8", + "APIApichatschatIdOPTIONS4498230E", + "APIApichatschatIdE67019A6", + "APIApichatschatIdtitleOPTIONSFA0EB6B7", + "APIApichatschatIdtitlePUT15099F54", + "APIApichatschatIdtitleC5AEA917", + "APIApichatsGET40767623", + "APIApichatsOPTIONSDFF708CB", + "APIApichatsPOSTF32299AA", + "APIApichatsE061702A", + "APIApifilefileNameDELETE54EB1050", + "APIApifilefileNameOPTIONS6C97AC5A", + "APIApifilefileName2B0471F4", + "APIApifileOPTIONS64A72556", + "APIApifile76AB343B", + "APIApifileurlGET6E9EDFE6", + "APIApifileurlOPTIONS658BFB93", + "APIApifileurlPOST73D5BB3A", + "APIApifileurl08DA507F", + "APIApiimagegenerateOPTIONS58BC3827", + "APIApiimagegeneratePOST0F60597D", + "APIApiimagegenerate70662BCD", + "APIApiimageOPTIONSA57099DB", + "APIApiimage6FBCA1DF", + "APIApiOPTIONSE134DC36", + "APIApipredictOPTIONS9065A8D6", + "APIApipredictPOST376D7D2E", + "APIApipredict6CA3C413", + "APIApipredicttitleOPTIONS3DCF08ED", + "APIApipredicttitlePOSTAC11F63E", + "APIApipredicttitle8F6A9913", + "APIApiragknowledgebaseOPTIONSF0724AB5", + "APIApiragknowledgebase25F53940", + "APIApiragknowledgebaseretrieveOPTIONS520513E9", + "APIApiragknowledgebaseretrievePOST8609F339", + "APIApiragknowledgebaseretrieve42B4F7F4", + "APIApiragOPTIONSAF55562D", + "APIApiragqueryOPTIONS0831C743", + "APIApiragqueryPOST959F42AE", + "APIApiragqueryBFCC1FE8", + "APIApiragB0FA73F7", + "APIApiragretrieveOPTIONS76F86387", + "APIApiragretrievePOST1B75699C", + "APIApiragretrieve8A07B1EB", + "APIApishareschatchatIdGETFD670180", + "APIApishareschatchatIdOPTIONSBA4BB233", + "APIApishareschatchatIdPOSTC94D0E3B", + "APIApishareschatchatIdABA7B83C", + "APIApishareschatOPTIONSB4A81F6A", + "APIApishareschatA32CD614", + "APIApisharesOPTIONSF1049E3B", + "APIApishares3C1C04E5", + "APIApisharesshareshareIdDELETE231A4EBF", + "APIApisharesshareshareIdGETADBE379F", + "APIApisharesshareshareIdOPTIONSC762F46F", + "APIApisharesshareshareId3696CDAF", + "APIApisharesshareOPTIONS6D42A67D", + "APIApisharesshareF2EC0273", + "APIApispeechtospeechOPTIONS92DBE1B9", + "APIApispeechtospeechPOST8D76474A", + "APIApispeechtospeechD6FA255B", + "APIApisystemcontextssystemContextIdDELETEB527E743", + "APIApisystemcontextssystemContextIdOPTIONS96E8D02C", + "APIApisystemcontextssystemContextId9D6F9E56", + "APIApisystemcontextssystemContextIdtitleOPTIONS069062F2", + "APIApisystemcontextssystemContextIdtitlePUT66B31C9A", + "APIApisystemcontextssystemContextIdtitleD469F521", + "APIApisystemcontextsGET7ECB64D3", + "APIApisystemcontextsOPTIONS0D2703AA", + "APIApisystemcontextsPOST3883EC4A", + "APIApisystemcontexts57785227", + "APIApitokenusageGETF4970022", + "APIApitokenusageOPTIONS59BB9297", + "APIApitokenusageD4EF3867", + "APIApitranscribeOPTIONS5030955A", + "APIApitranscribe874542A9", + "APIApitranscriberesultjobNameGET5C0FF2AB", + "APIApitranscriberesultjobNameOPTIONS7E77FDC0", + "APIApitranscriberesultjobName32470D3A", + "APIApitranscriberesultOPTIONS36EC9D59", + "APIApitranscriberesult3CDED854", + "APIApitranscribestartOPTIONSFA1C7723", + "APIApitranscribestartPOSTC6AF1C94", + "APIApitranscribestartB105DFD0", + "APIApitranscribeurlOPTIONS6B7DF1F0", + "APIApitranscribeurlPOSTFBEEA27D", + "APIApitranscribeurlAA281183", + "APIApiusecasesuseCaseIdDELETE1F3AB356", + "APIApiusecasesuseCaseIdfavoriteOPTIONS0F973203", + "APIApiusecasesuseCaseIdfavoritePUT21685F6D", + "APIApiusecasesuseCaseIdfavorite90DE0E70", + "APIApiusecasesuseCaseIdGETC2534B44", + "APIApiusecasesuseCaseIdOPTIONSED014E42", + "APIApiusecasesuseCaseIdPUTA7E744AE", + "APIApiusecasesuseCaseId0C4C07B7", + "APIApiusecasesuseCaseIdsharedOPTIONSAB2FF611", + "APIApiusecasesuseCaseIdsharedPUTDF4FDAF2", + "APIApiusecasesuseCaseIdshared2A60752B", + "APIApiusecasesfavoriteGET8A304871", + "APIApiusecasesfavoriteOPTIONSD85A54B6", + "APIApiusecasesfavorite18DA851B", + "APIApiusecasesGET38D0EBF4", + "APIApiusecasesOPTIONSCF3D8287", + "APIApiusecasesPOST3244C369", + "APIApiusecasesrecentuseCaseIdOPTIONSCE83DFE2", + "APIApiusecasesrecentuseCaseIdPUT1B7638B2", + "APIApiusecasesrecentuseCaseId2CF3EF72", + "APIApiusecasesrecentGETCE116566", + "APIApiusecasesrecentOPTIONS750FF00D", + "APIApiusecasesrecent31965B7B", + "APIApiusecases8321EF30", + "APIApivideogeneratecreatedDateDELETE0F2B03A2", + "APIApivideogeneratecreatedDateOPTIONS9EB2B1CE", + "APIApivideogeneratecreatedDate1AAB9D62", + "APIApivideogenerateGETC779E422", + "APIApivideogenerateOPTIONS14AE6956", + "APIApivideogeneratePOSTACA060AA", + "APIApivideogenerateCBF56796", + "APIApivideoOPTIONS20C58EF2", + "APIApivideoAEC3C4D1", + "APIApiwebtextGETB44776EB", + "APIApiwebtextOPTIONS5EFD2A2D", + "APIApiwebtext0828B9D5", + ], + "Metadata": { + "aws:cdk:do-not-refactor": true, + }, + "Properties": { + "Description": "Automatically created by the RestApi construct", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Deployment", + "UpdateReplacePolicy": "Delete", + }, + "APIApiDeploymentStageapiCD55D117": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIApiAccountF2C87424", + ], + "Properties": { + "DeploymentId": { + "Ref": "APIApiDeployment3A5021234db71f4ccf16e49a8440e8926bf1f516", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + "StageName": "api", + }, + "Type": "AWS::ApiGateway::Stage", + "UpdateReplacePolicy": "Delete", + }, + "APIApiFFA96F67": { + "DeletionPolicy": "Delete", + "Properties": { + "Name": "Api", + }, + "Type": "AWS::ApiGateway::RestApi", + "UpdateReplacePolicy": "Delete", + }, + "APIApiOPTIONSE134DC36": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagents70FB378D": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "agents", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsANY50AC6B55": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "AgentBuilderAuthorizerE8188502", + }, + "HttpMethod": "ANY", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "AgentBuilder03642B5C", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiagents70FB378D", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsANYApiPermissionGenerativeAiUseCasesStackAPIApi89219E17ANYagents504D0ECA": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "AgentBuilder03642B5C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/*/agents", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsANYApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17ANYagents66D9562D": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "AgentBuilder03642B5C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/*/agents", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsOPTIONS064D2F41": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiagents70FB378D", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsproxy440913A2": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiagents70FB378D", + }, + "PathPart": "{proxy+}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsproxyANY44A4A08E": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "AgentBuilderAuthorizerE8188502", + }, + "HttpMethod": "ANY", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "AgentBuilder03642B5C", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiagentsproxy440913A2", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsproxyANYApiPermissionGenerativeAiUseCasesStackAPIApi89219E17ANYagentsproxyB1492E94": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "AgentBuilder03642B5C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/*/agents/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsproxyANYApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17ANYagentsproxy619296F3": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "AgentBuilder03642B5C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/*/agents/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiagentsproxyOPTIONS65C845F9": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiagentsproxy440913A2", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatsE061702A": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "chats", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatsGET40767623": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIListChats12807275", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApichatsE061702A", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatsGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETchats3464EF3A": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIListChats12807275", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/chats", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatsGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETchatsE1DE3C5A": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIListChats12807275", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/chats", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatsOPTIONSDFF708CB": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApichatsE061702A", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatsPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTchats6FB5CEC9": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APICreateChatE07AFAF4", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/chats", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatsPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTchatsE0E202B2": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APICreateChatE07AFAF4", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/chats", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatsPOSTF32299AA": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APICreateChatE07AFAF4", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApichatsE061702A", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdDELETE4578D41B": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "DELETE", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIDeleteChat1517278C", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApichatschatIdE67019A6", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdDELETEApiPermissionGenerativeAiUseCasesStackAPIApi89219E17DELETEchatschatIdCBAD7732": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteChat1517278C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/DELETE/chats/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdDELETEApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17DELETEchatschatId6DBAD3C3": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteChat1517278C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/DELETE/chats/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdE67019A6": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApichatsE061702A", + }, + "PathPart": "{chatId}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdGET152C9123": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIFindChatbyId74476825", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApichatschatIdE67019A6", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETchatschatIdC82A138E": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIFindChatbyId74476825", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/chats/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETchatschatIdCA130D83": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIFindChatbyId74476825", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/chats/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdOPTIONS4498230E": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApichatschatIdE67019A6", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdfeedbacksF371F57A": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApichatschatIdE67019A6", + }, + "PathPart": "feedbacks", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdfeedbacksOPTIONS7AB34AA5": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApichatschatIdfeedbacksF371F57A", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdfeedbacksPOST3E9ACBEC": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIUpdateFeedback2F9276A1", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApichatschatIdfeedbacksF371F57A", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdfeedbacksPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTchatschatIdfeedbacksE8588286": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIUpdateFeedback2F9276A1", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/chats/*/feedbacks", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdfeedbacksPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTchatschatIdfeedbacks52610594": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIUpdateFeedback2F9276A1", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/chats/*/feedbacks", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdmessagesAF527CE8": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApichatschatIdE67019A6", + }, + "PathPart": "messages", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdmessagesGET94AB097F": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIListMessages536ED2CC", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApichatschatIdmessagesAF527CE8", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdmessagesGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETchatschatIdmessages122A59FC": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIListMessages536ED2CC", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/chats/*/messages", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdmessagesGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETchatschatIdmessages3F025E8E": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIListMessages536ED2CC", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/chats/*/messages", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdmessagesOPTIONS20207E07": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApichatschatIdmessagesAF527CE8", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdmessagesPOST4197DA8F": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APICreateMessages1C3421C0", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApichatschatIdmessagesAF527CE8", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdmessagesPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTchatschatIdmessages832E69DC": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APICreateMessages1C3421C0", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/chats/*/messages", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdmessagesPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTchatschatIdmessagesDB24918A": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APICreateMessages1C3421C0", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/chats/*/messages", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdtitleC5AEA917": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApichatschatIdE67019A6", + }, + "PathPart": "title", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdtitleOPTIONSFA0EB6B7": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApichatschatIdtitleC5AEA917", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdtitlePUT15099F54": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "PUT", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIUpdateChatTitleF8FCA547", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApichatschatIdtitleC5AEA917", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdtitlePUTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17PUTchatschatIdtitleF57C315F": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIUpdateChatTitleF8FCA547", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/PUT/chats/*/title", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApichatschatIdtitlePUTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17PUTchatschatIdtitle5F294013": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIUpdateChatTitleF8FCA547", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/PUT/chats/*/title", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApifile76AB343B": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "file", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileOPTIONS64A72556": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApifile76AB343B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApifilefileName2B0471F4": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApifile76AB343B", + }, + "PathPart": "{fileName}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApifilefileNameDELETE54EB1050": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "DELETE", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIDeleteFileFunctionC52312C7", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApifilefileName2B0471F4", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApifilefileNameDELETEApiPermissionGenerativeAiUseCasesStackAPIApi89219E17DELETEfilefileName48EC68D3": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteFileFunctionC52312C7", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/DELETE/file/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApifilefileNameDELETEApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17DELETEfilefileName6979E07E": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteFileFunctionC52312C7", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/DELETE/file/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApifilefileNameOPTIONS6C97AC5A": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApifilefileName2B0471F4", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileurl08DA507F": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApifile76AB343B", + }, + "PathPart": "url", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileurlGET6E9EDFE6": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIGetFileDownloadSignedUrlFunction8B43389C", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApifileurl08DA507F", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileurlGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETfileurl0485E8FF": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetFileDownloadSignedUrlFunction8B43389C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/file/url", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileurlGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETfileurl88BCDC54": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetFileDownloadSignedUrlFunction8B43389C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/file/url", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileurlOPTIONS658BFB93": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApifileurl08DA507F", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileurlPOST73D5BB3A": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIGetSignedUrl0A6EC682", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApifileurl08DA507F", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileurlPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTfileurl83D310CC": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetSignedUrl0A6EC682", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/file/url", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApifileurlPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTfileurlB327A180": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetSignedUrl0A6EC682", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/file/url", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiimage6FBCA1DF": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "image", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiimageOPTIONSA57099DB": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiimage6FBCA1DF", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiimagegenerate70662BCD": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiimage6FBCA1DF", + }, + "PathPart": "generate", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiimagegenerateOPTIONS58BC3827": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiimagegenerate70662BCD", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiimagegeneratePOST0F60597D": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIGenerateImage777647C7", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiimagegenerate70662BCD", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiimagegeneratePOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTimagegenerate41F8E49F": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGenerateImage777647C7", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/image/generate", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiimagegeneratePOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTimagegenerateFE576B22": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGenerateImage777647C7", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/image/generate", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredict6CA3C413": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "predict", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredictOPTIONS9065A8D6": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApipredict6CA3C413", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredictPOST376D7D2E": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIPredict09E4E4FF", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApipredict6CA3C413", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredictPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTpredict03DB8E81": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIPredict09E4E4FF", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/predict", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredictPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTpredictFAF8FA72": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIPredict09E4E4FF", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/predict", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredicttitle8F6A9913": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApipredict6CA3C413", + }, + "PathPart": "title", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredicttitleOPTIONS3DCF08ED": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApipredicttitle8F6A9913", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredicttitlePOSTAC11F63E": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIPredictTitle95F64FA4", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApipredicttitle8F6A9913", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredicttitlePOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTpredicttitle9C698441": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIPredictTitle95F64FA4", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/predict/title", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApipredicttitlePOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTpredicttitleF8561C52": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIPredictTitle95F64FA4", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/predict/title", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragB0FA73F7": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "rag", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragOPTIONSAF55562D": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiragB0FA73F7", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragknowledgebase25F53940": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "rag-knowledge-base", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragknowledgebaseOPTIONSF0724AB5": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiragknowledgebase25F53940", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragknowledgebaseretrieve42B4F7F4": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiragknowledgebase25F53940", + }, + "PathPart": "retrieve", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragknowledgebaseretrieveOPTIONS520513E9": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiragknowledgebaseretrieve42B4F7F4", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragknowledgebaseretrievePOST8609F339": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "RagKnowledgeBaseAuthorizerE73D3108", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "RagKnowledgeBaseRetrieve67B5F652", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiragknowledgebaseretrieve42B4F7F4", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragknowledgebaseretrievePOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTragknowledgebaseretrieveB37A11F0": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "RagKnowledgeBaseRetrieve67B5F652", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/rag-knowledge-base/retrieve", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragknowledgebaseretrievePOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTragknowledgebaseretrieveC4571797": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "RagKnowledgeBaseRetrieve67B5F652", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/rag-knowledge-base/retrieve", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragqueryBFCC1FE8": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiragB0FA73F7", + }, + "PathPart": "query", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragqueryOPTIONS0831C743": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiragqueryBFCC1FE8", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragqueryPOST959F42AE": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "RagAuthorizer1D577454", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "RagQuery46261080", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiragqueryBFCC1FE8", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragqueryPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTragquery34589789": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "RagQuery46261080", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/rag/query", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragqueryPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTragquery4D39714A": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "RagQuery46261080", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/rag/query", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragretrieve8A07B1EB": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiragB0FA73F7", + }, + "PathPart": "retrieve", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragretrieveOPTIONS76F86387": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiragretrieve8A07B1EB", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragretrievePOST1B75699C": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "RagAuthorizer1D577454", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "RagRetrieve78B54C98", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiragretrieve8A07B1EB", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragretrievePOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTragretrieve4FD20ADA": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "RagRetrieve78B54C98", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/rag/retrieve", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiragretrievePOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTragretrieve5954A588": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "RagRetrieve78B54C98", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/rag/retrieve", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApishares3C1C04E5": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "shares", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesOPTIONSF1049E3B": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApishares3C1C04E5", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatA32CD614": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApishares3C1C04E5", + }, + "PathPart": "chat", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatOPTIONSB4A81F6A": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApishareschatA32CD614", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatchatIdABA7B83C": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApishareschatA32CD614", + }, + "PathPart": "{chatId}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatchatIdGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETshareschatchatId4FEA8BD7": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIFindShareId3F1AA77B", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/shares/chat/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatchatIdGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETshareschatchatId9DA80291": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIFindShareId3F1AA77B", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/shares/chat/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatchatIdGETFD670180": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIFindShareId3F1AA77B", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApishareschatchatIdABA7B83C", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatchatIdOPTIONSBA4BB233": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApishareschatchatIdABA7B83C", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatchatIdPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTshareschatchatId5D45558E": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APICreateShareId3D7F7B2B", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/shares/chat/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatchatIdPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTshareschatchatIdD6448444": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APICreateShareId3D7F7B2B", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/shares/chat/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApishareschatchatIdPOSTC94D0E3B": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APICreateShareId3D7F7B2B", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApishareschatchatIdABA7B83C", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareF2EC0273": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApishares3C1C04E5", + }, + "PathPart": "share", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareOPTIONS6D42A67D": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApisharesshareF2EC0273", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareshareId3696CDAF": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApisharesshareF2EC0273", + }, + "PathPart": "{shareId}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareshareIdDELETE231A4EBF": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "DELETE", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIDeleteShareIdFE187370", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApisharesshareshareId3696CDAF", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareshareIdDELETEApiPermissionGenerativeAiUseCasesStackAPIApi89219E17DELETEsharesshareshareId73BA7001": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteShareIdFE187370", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/DELETE/shares/share/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareshareIdDELETEApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17DELETEsharesshareshareId451B7B87": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteShareIdFE187370", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/DELETE/shares/share/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareshareIdGETADBE379F": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIGetSharedChatF02561ED", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApisharesshareshareId3696CDAF", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareshareIdGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETsharesshareshareIdF221D57E": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetSharedChatF02561ED", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/shares/share/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareshareIdGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETsharesshareshareIdA0DBEBA8": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetSharedChatF02561ED", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/shares/share/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisharesshareshareIdOPTIONSC762F46F": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApisharesshareshareId3696CDAF", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApispeechtospeechD6FA255B": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "speech-to-speech", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApispeechtospeechOPTIONS92DBE1B9": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApispeechtospeechD6FA255B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApispeechtospeechPOST8D76474A": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "SpeechToSpeechAuthorizerF61277A4", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "SpeechToSpeechStartSession80A7495E", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApispeechtospeechD6FA255B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApispeechtospeechPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTspeechtospeech0FB686CB": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SpeechToSpeechStartSession80A7495E", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/speech-to-speech", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApispeechtospeechPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTspeechtospeech2C9E93F5": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SpeechToSpeechStartSession80A7495E", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/speech-to-speech", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontexts57785227": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "systemcontexts", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextsGET7ECB64D3": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIListSystemContexts08AE4129", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApisystemcontexts57785227", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextsGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETsystemcontextsDB07D691": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIListSystemContexts08AE4129", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/systemcontexts", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextsGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETsystemcontextsF0766633": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIListSystemContexts08AE4129", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/systemcontexts", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextsOPTIONS0D2703AA": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApisystemcontexts57785227", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextsPOST3883EC4A": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APICreateSystemContextsB5DC1BC2", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApisystemcontexts57785227", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextsPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTsystemcontexts30E77A37": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APICreateSystemContextsB5DC1BC2", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/systemcontexts", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextsPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTsystemcontexts9936F5B4": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APICreateSystemContextsB5DC1BC2", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/systemcontexts", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextId9D6F9E56": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApisystemcontexts57785227", + }, + "PathPart": "{systemContextId}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdDELETEApiPermissionGenerativeAiUseCasesStackAPIApi89219E17DELETEsystemcontextssystemContextId630D4328": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteSystemContexts7B545538", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/DELETE/systemcontexts/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdDELETEApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17DELETEsystemcontextssystemContextId35BF96AA": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteSystemContexts7B545538", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/DELETE/systemcontexts/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdDELETEB527E743": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "DELETE", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIDeleteSystemContexts7B545538", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApisystemcontextssystemContextId9D6F9E56", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdOPTIONS96E8D02C": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApisystemcontextssystemContextId9D6F9E56", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdtitleD469F521": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApisystemcontextssystemContextId9D6F9E56", + }, + "PathPart": "title", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdtitleOPTIONS069062F2": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApisystemcontextssystemContextIdtitleD469F521", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdtitlePUT66B31C9A": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "PUT", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIUpdateSystemContextTitle5806E033", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApisystemcontextssystemContextIdtitleD469F521", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdtitlePUTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17PUTsystemcontextssystemContextIdtitle58A35261": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIUpdateSystemContextTitle5806E033", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/PUT/systemcontexts/*/title", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApisystemcontextssystemContextIdtitlePUTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17PUTsystemcontextssystemContextIdtitleE4838F65": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIUpdateSystemContextTitle5806E033", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/PUT/systemcontexts/*/title", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitokenusageD4EF3867": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "token-usage", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApitokenusageGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETtokenusageB8578FCA": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetTokenUsageE1C5C872", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/token-usage", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitokenusageGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETtokenusage69F1E4E9": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetTokenUsageE1C5C872", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/token-usage", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitokenusageGETF4970022": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIGetTokenUsageE1C5C872", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApitokenusageD4EF3867", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitokenusageOPTIONS59BB9297": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApitokenusageD4EF3867", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribe874542A9": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "transcribe", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribeOPTIONS5030955A": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApitranscribe874542A9", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscriberesult3CDED854": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApitranscribe874542A9", + }, + "PathPart": "result", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscriberesultOPTIONS36EC9D59": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApitranscriberesult3CDED854", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscriberesultjobName32470D3A": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApitranscriberesult3CDED854", + }, + "PathPart": "{jobName}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscriberesultjobNameGET5C0FF2AB": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "TranscribeAuthorizerAD1EA74B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "TranscribeGetTranscription3C736BFC", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApitranscriberesultjobName32470D3A", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscriberesultjobNameGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETtranscriberesultjobName373CF04F": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "TranscribeGetTranscription3C736BFC", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/transcribe/result/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscriberesultjobNameGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETtranscriberesultjobName7DED403C": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "TranscribeGetTranscription3C736BFC", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/transcribe/result/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscriberesultjobNameOPTIONS7E77FDC0": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApitranscriberesultjobName32470D3A", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribestartB105DFD0": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApitranscribe874542A9", + }, + "PathPart": "start", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribestartOPTIONSFA1C7723": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApitranscribestartB105DFD0", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribestartPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTtranscribestart805B4A00": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "TranscribeStartTranscription7C6A7A96", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/transcribe/start", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribestartPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTtranscribestartB4BBCC0F": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "TranscribeStartTranscription7C6A7A96", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/transcribe/start", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribestartPOSTC6AF1C94": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "TranscribeAuthorizerAD1EA74B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "TranscribeStartTranscription7C6A7A96", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApitranscribestartB105DFD0", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribeurlAA281183": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApitranscribe874542A9", + }, + "PathPart": "url", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribeurlOPTIONS6B7DF1F0": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApitranscribeurlAA281183", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribeurlPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTtranscribeurl0730085A": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "TranscribeGetSignedUrlB23CCF77", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/transcribe/url", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribeurlPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTtranscribeurl5D712187": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "TranscribeGetSignedUrlB23CCF77", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/transcribe/url", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApitranscribeurlPOSTFBEEA27D": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "TranscribeAuthorizerAD1EA74B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "TranscribeGetSignedUrlB23CCF77", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApitranscribeurlAA281183", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecases8321EF30": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "usecases", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesGET38D0EBF4": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderListUseCases151E3C64", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecases8321EF30", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETusecasesF8C58050": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderListUseCases151E3C64", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/usecases", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETusecases14666936": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderListUseCases151E3C64", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/usecases", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesOPTIONSCF3D8287": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiusecases8321EF30", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesPOST3244C369": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderCreateUseCase63174982", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecases8321EF30", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesPOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTusecasesE4BDB3E8": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderCreateUseCase63174982", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/usecases", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesPOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTusecasesC5D90CEC": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderCreateUseCase63174982", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/usecases", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesfavorite18DA851B": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiusecases8321EF30", + }, + "PathPart": "favorite", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesfavoriteGET8A304871": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderListFavoriteUseCasesC4AF9A45", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecasesfavorite18DA851B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesfavoriteGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETusecasesfavoriteC6AE1271": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderListFavoriteUseCasesC4AF9A45", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/usecases/favorite", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesfavoriteGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETusecasesfavoriteA4037737": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderListFavoriteUseCasesC4AF9A45", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/usecases/favorite", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesfavoriteOPTIONSD85A54B6": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiusecasesfavorite18DA851B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecent31965B7B": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiusecases8321EF30", + }, + "PathPart": "recent", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETusecasesrecent7027584C": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderListRecentlyUsedUseCases8560B5B5", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/usecases/recent", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETusecasesrecent309376FC": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderListRecentlyUsedUseCases8560B5B5", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/usecases/recent", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentGETCE116566": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderListRecentlyUsedUseCases8560B5B5", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecasesrecent31965B7B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentOPTIONS750FF00D": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiusecasesrecent31965B7B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentuseCaseId2CF3EF72": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiusecasesrecent31965B7B", + }, + "PathPart": "{useCaseId}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentuseCaseIdOPTIONSCE83DFE2": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiusecasesrecentuseCaseId2CF3EF72", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentuseCaseIdPUT1B7638B2": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "PUT", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderUpdateRecentlyUsedUseCase67823255", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecasesrecentuseCaseId2CF3EF72", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentuseCaseIdPUTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17PUTusecasesrecentuseCaseIdB54F2E73": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderUpdateRecentlyUsedUseCase67823255", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/PUT/usecases/recent/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesrecentuseCaseIdPUTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17PUTusecasesrecentuseCaseIdFB75AFDF": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderUpdateRecentlyUsedUseCase67823255", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/PUT/usecases/recent/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseId0C4C07B7": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiusecases8321EF30", + }, + "PathPart": "{useCaseId}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdDELETE1F3AB356": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "DELETE", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderDeleteUseCaseA7529A4C", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecasesuseCaseId0C4C07B7", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdDELETEApiPermissionGenerativeAiUseCasesStackAPIApi89219E17DELETEusecasesuseCaseIdF5289441": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderDeleteUseCaseA7529A4C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/DELETE/usecases/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdDELETEApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17DELETEusecasesuseCaseId6F61629B": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderDeleteUseCaseA7529A4C", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/DELETE/usecases/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETusecasesuseCaseIdE0A0D134": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderGetUseCaseAB744D97", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/usecases/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETusecasesuseCaseId01DAE5E0": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderGetUseCaseAB744D97", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/usecases/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdGETC2534B44": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderGetUseCaseAB744D97", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecasesuseCaseId0C4C07B7", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdOPTIONSED014E42": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiusecasesuseCaseId0C4C07B7", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdPUTA7E744AE": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "PUT", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderUpdateUseCaseFF8D7827", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecasesuseCaseId0C4C07B7", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdPUTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17PUTusecasesuseCaseId6882E5B9": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderUpdateUseCaseFF8D7827", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/PUT/usecases/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdPUTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17PUTusecasesuseCaseIdEB0CB97B": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderUpdateUseCaseFF8D7827", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/PUT/usecases/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdfavorite90DE0E70": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiusecasesuseCaseId0C4C07B7", + }, + "PathPart": "favorite", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdfavoriteOPTIONS0F973203": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiusecasesuseCaseIdfavorite90DE0E70", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdfavoritePUT21685F6D": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "PUT", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderToggleFavoriteA16A6638", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecasesuseCaseIdfavorite90DE0E70", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdfavoritePUTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17PUTusecasesuseCaseIdfavoriteC25AF779": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderToggleFavoriteA16A6638", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/PUT/usecases/*/favorite", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdfavoritePUTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17PUTusecasesuseCaseIdfavoriteB500B92B": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderToggleFavoriteA16A6638", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/PUT/usecases/*/favorite", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdshared2A60752B": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApiusecasesuseCaseId0C4C07B7", + }, + "PathPart": "shared", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdsharedOPTIONSAB2FF611": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiusecasesuseCaseIdshared2A60752B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdsharedPUTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17PUTusecasesuseCaseIdshared2575AD5D": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderToggleSharedB07A30CD", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/PUT/usecases/*/shared", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdsharedPUTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17PUTusecasesuseCaseIdsharedEA8D2A41": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "UseCaseBuilderToggleSharedB07A30CD", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/PUT/usecases/*/shared", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiusecasesuseCaseIdsharedPUTDF4FDAF2": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "UseCaseBuilderAuthorizer8C07733E", + }, + "HttpMethod": "PUT", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "UseCaseBuilderToggleSharedB07A30CD", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiusecasesuseCaseIdshared2A60752B", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideoAEC3C4D1": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "video", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideoOPTIONS20C58EF2": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApivideoAEC3C4D1", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogenerateCBF56796": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApivideoAEC3C4D1", + }, + "PathPart": "generate", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogenerateGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETvideogenerate1240836A": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIListVideoJobsBF828ABB", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/video/generate", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogenerateGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETvideogenerate761C5A6E": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIListVideoJobsBF828ABB", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/video/generate", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogenerateGETC779E422": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIListVideoJobsBF828ABB", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApivideogenerateCBF56796", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogenerateOPTIONS14AE6956": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApivideogenerateCBF56796", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogeneratePOSTACA060AA": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "POST", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIGenerateVideo311A6D70", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApivideogenerateCBF56796", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogeneratePOSTApiPermissionGenerativeAiUseCasesStackAPIApi89219E17POSTvideogenerate4636D5B4": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGenerateVideo311A6D70", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/POST/video/generate", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogeneratePOSTApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17POSTvideogenerateCA4ED193": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGenerateVideo311A6D70", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/POST/video/generate", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogeneratecreatedDate1AAB9D62": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Ref": "APIApivideogenerateCBF56796", + }, + "PathPart": "{createdDate}", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogeneratecreatedDateDELETE0F2B03A2": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "DELETE", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIDeleteVideoJobD99C15C2", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApivideogeneratecreatedDate1AAB9D62", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogeneratecreatedDateDELETEApiPermissionGenerativeAiUseCasesStackAPIApi89219E17DELETEvideogeneratecreatedDate292B42E6": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteVideoJobD99C15C2", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/DELETE/video/generate/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogeneratecreatedDateDELETEApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17DELETEvideogeneratecreatedDateACA94630": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIDeleteVideoJobD99C15C2", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/DELETE/video/generate/*", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApivideogeneratecreatedDateOPTIONS9EB2B1CE": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApivideogeneratecreatedDate1AAB9D62", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiwebtext0828B9D5": { + "DeletionPolicy": "Delete", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "APIApiFFA96F67", + "RootResourceId", + ], + }, + "PathPart": "web-text", + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Resource", + "UpdateReplacePolicy": "Delete", + }, + "APIApiwebtextGETApiPermissionGenerativeAiUseCasesStackAPIApi89219E17GETwebtext02F70E92": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetWebText363F573D", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/GET/web-text", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiwebtextGETApiPermissionTestGenerativeAiUseCasesStackAPIApi89219E17GETwebtext850757AA": { + "DeletionPolicy": "Delete", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "APIGetWebText363F573D", + "Arn", + ], + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":execute-api:us-east-1:123456890123:", + { + "Ref": "APIApiFFA96F67", + }, + "/test-invoke-stage/GET/web-text", + ], + ], + }, + }, + "Type": "AWS::Lambda::Permission", + "UpdateReplacePolicy": "Delete", + }, + "APIApiwebtextGETB44776EB": { + "DeletionPolicy": "Delete", + "Properties": { + "AuthorizationType": "COGNITO_USER_POOLS", + "AuthorizerId": { + "Ref": "APIAuthorizer9DCC037B", + }, + "HttpMethod": "GET", + "Integration": { + "IntegrationHttpMethod": "POST", + "Type": "AWS_PROXY", + "Uri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1:lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "APIGetWebText363F573D", + "Arn", + ], + }, + "/invocations", + ], + ], + }, + }, + "ResourceId": { + "Ref": "APIApiwebtext0828B9D5", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIApiwebtextOPTIONS5EFD2A2D": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiKeyRequired": false, + "AuthorizationType": "NONE", + "HttpMethod": "OPTIONS", + "Integration": { + "IntegrationResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'", + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + }, + "StatusCode": "204", + }, + ], + "RequestTemplates": { + "application/json": "{ statusCode: 200 }", + }, + "Type": "MOCK", + }, + "MethodResponses": [ + { + "ResponseParameters": { + "method.response.header.Access-Control-Allow-Headers": true, + "method.response.header.Access-Control-Allow-Methods": true, + "method.response.header.Access-Control-Allow-Origin": true, + }, + "StatusCode": "204", + }, + ], + "ResourceId": { + "Ref": "APIApiwebtext0828B9D5", + }, + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + }, + "Type": "AWS::ApiGateway::Method", + "UpdateReplacePolicy": "Delete", + }, + "APIAuthorizer9DCC037B": { + "DeletionPolicy": "Delete", + "Properties": { + "IdentitySource": "method.request.header.Authorization", + "Name": "GenerativeAiUseCasesStackAPIAuthorizer21D53881", + "ProviderARNs": [ + { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + ], + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + "Type": "COGNITO_USER_POOLS", + }, + "Type": "AWS::ApiGateway::Authorizer", + "UpdateReplacePolicy": "Delete", + }, + "APICopyVideoJobB772026B": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APICopyVideoJobServiceRoleDefaultPolicy1BE7F305", + "APICopyVideoJobServiceRoleEB5412FA", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "BUCKET_NAME": { + "Ref": "APIFileBucket8FB29855", + }, + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "IMAGE_GENERATION_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "MODEL_REGION": "us-east-1", + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + "VIDEO_BUCKET_REGION_MAP": { + "Fn::Join": [ + "", + [ + "{"us-east-1":"", + { + "Fn::ImportValue": "VideoTmpBucketStackus-east-1:ExportsOutputRefBucket83908E7781C90AC0", + }, + ""}", + ], + ], + }, + "VIDEO_GENERATION_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "MemorySize": 512, + "Role": { + "Fn::GetAtt": [ + "APICopyVideoJobServiceRoleEB5412FA", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APICopyVideoJobServiceRoleDefaultPolicy1BE7F305": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject", + "s3:DeleteObject", + "s3:ListBucket", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Fn::ImportValue": "VideoTmpBucketStackus-east-1:ExportsOutputRefBucket83908E7781C90AC0", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Fn::ImportValue": "VideoTmpBucketStackus-east-1:ExportsOutputRefBucket83908E7781C90AC0", + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APICopyVideoJobServiceRoleDefaultPolicy1BE7F305", + "Roles": [ + { + "Ref": "APICopyVideoJobServiceRoleEB5412FA", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APICopyVideoJobServiceRoleEB5412FA": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APICreateChatE07AFAF4": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APICreateChatServiceRoleDefaultPolicy0072EEC4", + "APICreateChatServiceRoleC49F5DA3", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APICreateChatServiceRoleC49F5DA3", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APICreateChatServiceRoleC49F5DA3": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APICreateChatServiceRoleDefaultPolicy0072EEC4": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APICreateChatServiceRoleDefaultPolicy0072EEC4", + "Roles": [ + { + "Ref": "APICreateChatServiceRoleC49F5DA3", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APICreateMessages1C3421C0": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APICreateMessagesServiceRoleDefaultPolicy6B2A82CC", + "APICreateMessagesServiceRole3B693939", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "BUCKET_NAME": { + "Ref": "APIFileBucket8FB29855", + }, + "STATS_TABLE_NAME": { + "Ref": "DatabaseStatsTable9C709761", + }, + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APICreateMessagesServiceRole3B693939", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APICreateMessagesServiceRole3B693939": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APICreateMessagesServiceRoleDefaultPolicy6B2A82CC": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "DatabaseStatsTable9C709761", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APICreateMessagesServiceRoleDefaultPolicy6B2A82CC", + "Roles": [ + { + "Ref": "APICreateMessagesServiceRole3B693939", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APICreateShareId3D7F7B2B": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APICreateShareIdServiceRoleDefaultPolicy2ECB25CC", + "APICreateShareIdServiceRoleB27F0BB3", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APICreateShareIdServiceRoleB27F0BB3", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APICreateShareIdServiceRoleB27F0BB3": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APICreateShareIdServiceRoleDefaultPolicy2ECB25CC": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APICreateShareIdServiceRoleDefaultPolicy2ECB25CC", + "Roles": [ + { + "Ref": "APICreateShareIdServiceRoleB27F0BB3", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APICreateSystemContextsB5DC1BC2": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APICreateSystemContextsServiceRoleDefaultPolicy14B29479", + "APICreateSystemContextsServiceRoleD588AFD4", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APICreateSystemContextsServiceRoleD588AFD4", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APICreateSystemContextsServiceRoleD588AFD4": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APICreateSystemContextsServiceRoleDefaultPolicy14B29479": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APICreateSystemContextsServiceRoleDefaultPolicy14B29479", + "Roles": [ + { + "Ref": "APICreateSystemContextsServiceRoleD588AFD4", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteChat1517278C": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIDeleteChatServiceRoleDefaultPolicy010EC0CA", + "APIDeleteChatServiceRole6340C3C0", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIDeleteChatServiceRole6340C3C0", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteChatServiceRole6340C3C0": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteChatServiceRoleDefaultPolicy010EC0CA": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIDeleteChatServiceRoleDefaultPolicy010EC0CA", + "Roles": [ + { + "Ref": "APIDeleteChatServiceRole6340C3C0", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteFileFunctionC52312C7": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIDeleteFileFunctionServiceRoleDefaultPolicy2347797A", + "APIDeleteFileFunctionServiceRoleCEF08B07", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "BUCKET_NAME": { + "Ref": "APIFileBucket8FB29855", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIDeleteFileFunctionServiceRoleCEF08B07", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteFileFunctionServiceRoleCEF08B07": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteFileFunctionServiceRoleDefaultPolicy2347797A": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:DeleteObject*", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + "/*", + ], + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIDeleteFileFunctionServiceRoleDefaultPolicy2347797A", + "Roles": [ + { + "Ref": "APIDeleteFileFunctionServiceRoleCEF08B07", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteShareIdFE187370": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIDeleteShareIdServiceRoleDefaultPolicy7764E7A7", + "APIDeleteShareIdServiceRole02E8B695", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIDeleteShareIdServiceRole02E8B695", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteShareIdServiceRole02E8B695": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteShareIdServiceRoleDefaultPolicy7764E7A7": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIDeleteShareIdServiceRoleDefaultPolicy7764E7A7", + "Roles": [ + { + "Ref": "APIDeleteShareIdServiceRole02E8B695", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteSystemContexts7B545538": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIDeleteSystemContextsServiceRoleDefaultPolicy7DF20D3B", + "APIDeleteSystemContextsServiceRole63CAEFD9", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIDeleteSystemContextsServiceRole63CAEFD9", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteSystemContextsServiceRole63CAEFD9": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteSystemContextsServiceRoleDefaultPolicy7DF20D3B": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIDeleteSystemContextsServiceRoleDefaultPolicy7DF20D3B", + "Roles": [ + { + "Ref": "APIDeleteSystemContextsServiceRole63CAEFD9", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteVideoJobD99C15C2": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIDeleteVideoJobServiceRoleDefaultPolicyFA4EF7B6", + "APIDeleteVideoJobServiceRole42910CE4", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "IMAGE_GENERATION_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + "VIDEO_GENERATION_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIDeleteVideoJobServiceRole42910CE4", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteVideoJobServiceRole42910CE4": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIDeleteVideoJobServiceRoleDefaultPolicyFA4EF7B6": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIDeleteVideoJobServiceRoleDefaultPolicyFA4EF7B6", + "Roles": [ + { + "Ref": "APIDeleteVideoJobServiceRole42910CE4", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIFileBucket8FB29855": { + "DeletionPolicy": "Delete", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*", + ], + "AllowedMethods": [ + "GET", + "POST", + "PUT", + ], + "AllowedOrigins": [ + "*", + ], + "ExposedHeaders": [], + "MaxAge": 3000, + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "APIFileBucketAutoDeleteObjectsCustomResourceDAA1C1BF": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIFileBucketPolicyDD3E15C2", + ], + "Properties": { + "BucketName": { + "Ref": "APIFileBucket8FB29855", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "APIFileBucketPolicyDD3E15C2": { + "DeletionPolicy": "Delete", + "Properties": { + "Bucket": { + "Ref": "APIFileBucket8FB29855", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "APIFindChatbyId74476825": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIFindChatbyIdServiceRoleDefaultPolicyDDD2446A", + "APIFindChatbyIdServiceRole35A1548F", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIFindChatbyIdServiceRole35A1548F", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIFindChatbyIdServiceRole35A1548F": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIFindChatbyIdServiceRoleDefaultPolicyDDD2446A": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIFindChatbyIdServiceRoleDefaultPolicyDDD2446A", + "Roles": [ + { + "Ref": "APIFindChatbyIdServiceRole35A1548F", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIFindShareId3F1AA77B": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIFindShareIdServiceRoleDefaultPolicy60AF3775", + "APIFindShareIdServiceRole2DC02BD9", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIFindShareIdServiceRole2DC02BD9", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIFindShareIdServiceRole2DC02BD9": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIFindShareIdServiceRoleDefaultPolicy60AF3775": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIFindShareIdServiceRoleDefaultPolicy60AF3775", + "Roles": [ + { + "Ref": "APIFindShareIdServiceRole2DC02BD9", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIGenerateImage777647C7": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIGenerateImageServiceRoleDefaultPolicy62C0EC56", + "APIGenerateImageServiceRoleC0428356", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "IMAGE_GENERATION_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "MODEL_REGION": "us-east-1", + "VIDEO_GENERATION_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIGenerateImageServiceRoleC0428356", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIGenerateImageServiceRoleC0428356": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIGenerateImageServiceRoleDefaultPolicy62C0EC56": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "bedrock:*", + "logs:*", + "aws-marketplace:Subscribe", + "aws-marketplace:Unsubscribe", + "aws-marketplace:ViewSubscriptions", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIGenerateImageServiceRoleDefaultPolicy62C0EC56", + "Roles": [ + { + "Ref": "APIGenerateImageServiceRoleC0428356", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIGenerateVideo311A6D70": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIGenerateVideoServiceRoleDefaultPolicy34AB447C", + "APIGenerateVideoServiceRole3DDCDDA7", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "BUCKET_NAME": { + "Ref": "APIFileBucket8FB29855", + }, + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "IMAGE_GENERATION_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "MODEL_REGION": "us-east-1", + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + "VIDEO_BUCKET_OWNER": "123456890123", + "VIDEO_BUCKET_REGION_MAP": { + "Fn::Join": [ + "", + [ + "{"us-east-1":"", + { + "Fn::ImportValue": "VideoTmpBucketStackus-east-1:ExportsOutputRefBucket83908E7781C90AC0", + }, + ""}", + ], + ], + }, + "VIDEO_GENERATION_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIGenerateVideoServiceRole3DDCDDA7", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIGenerateVideoServiceRole3DDCDDA7": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIGenerateVideoServiceRoleDefaultPolicy34AB447C": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Fn::ImportValue": "VideoTmpBucketStackus-east-1:ExportsOutputRefBucket83908E7781C90AC0", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Fn::ImportValue": "VideoTmpBucketStackus-east-1:ExportsOutputRefBucket83908E7781C90AC0", + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + { + "Action": [ + "bedrock:*", + "logs:*", + "aws-marketplace:Subscribe", + "aws-marketplace:Unsubscribe", + "aws-marketplace:ViewSubscriptions", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIGenerateVideoServiceRoleDefaultPolicy34AB447C", + "Roles": [ + { + "Ref": "APIGenerateVideoServiceRole3DDCDDA7", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIGetFileDownloadSignedUrlFunction8B43389C": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIGetFileDownloadSignedUrlFunctionServiceRoleDefaultPolicy2880D406", + "APIGetFileDownloadSignedUrlFunctionServiceRole83916D13", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "MODEL_REGION": "us-east-1", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIGetFileDownloadSignedUrlFunctionServiceRole83916D13", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIGetFileDownloadSignedUrlFunctionServiceRole83916D13": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIGetFileDownloadSignedUrlFunctionServiceRoleDefaultPolicy2880D406": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "APIFileBucket8FB29855", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "APIFileBucket8FB29855", + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Fn::ImportValue": "AgentCoreStack:ExportsOutputRefGenericAgentCoreAgentCoreFileBucket0430DA423298A79F", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Fn::ImportValue": "AgentCoreStack:ExportsOutputRefGenericAgentCoreAgentCoreFileBucket0430DA423298A79F", + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "RagDataSourceBucket091872DB", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "RagDataSourceBucket091872DB", + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Fn::ImportValue": "RagKnowledgeBaseStack:ExportsOutputRefDataSourceBucket9FA93E04BB6984D1", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Fn::ImportValue": "RagKnowledgeBaseStack:ExportsOutputRefDataSourceBucket9FA93E04BB6984D1", + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIGetFileDownloadSignedUrlFunctionServiceRoleDefaultPolicy2880D406", + "Roles": [ + { + "Ref": "APIGetFileDownloadSignedUrlFunctionServiceRole83916D13", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIGetSharedChatF02561ED": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIGetSharedChatServiceRoleDefaultPolicy99124ED8", + "APIGetSharedChatServiceRole20022F3B", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIGetSharedChatServiceRole20022F3B", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIGetSharedChatServiceRole20022F3B": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIGetSharedChatServiceRoleDefaultPolicy99124ED8": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIGetSharedChatServiceRoleDefaultPolicy99124ED8", + "Roles": [ + { + "Ref": "APIGetSharedChatServiceRole20022F3B", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIGetSignedUrl0A6EC682": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIGetSignedUrlServiceRoleDefaultPolicy7028155F", + "APIGetSignedUrlServiceRole3309134D", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "BUCKET_NAME": { + "Ref": "APIFileBucket8FB29855", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIGetSignedUrlServiceRole3309134D", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIGetSignedUrlServiceRole3309134D": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIGetSignedUrlServiceRoleDefaultPolicy7028155F": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "APIFileBucket8FB29855", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "APIFileBucket8FB29855", + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIGetSignedUrlServiceRoleDefaultPolicy7028155F", + "Roles": [ + { + "Ref": "APIGetSignedUrlServiceRole3309134D", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIGetTokenUsageE1C5C872": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIGetTokenUsageServiceRoleDefaultPolicy9A5B3DA6", + "APIGetTokenUsageServiceRoleBA7D93BB", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "STATS_TABLE_NAME": { + "Ref": "DatabaseStatsTable9C709761", + }, + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIGetTokenUsageServiceRoleBA7D93BB", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIGetTokenUsageServiceRoleBA7D93BB": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIGetTokenUsageServiceRoleDefaultPolicy9A5B3DA6": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "DatabaseStatsTable9C709761", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIGetTokenUsageServiceRoleDefaultPolicy9A5B3DA6", + "Roles": [ + { + "Ref": "APIGetTokenUsageServiceRoleBA7D93BB", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIGetWebText363F573D": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIGetWebTextServiceRole2A2618E2", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIGetWebTextServiceRole2A2618E2", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIGetWebTextServiceRole2A2618E2": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIInvokeFlow03786D76": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIInvokeFlowServiceRoleDefaultPolicyF59A1D3B", + "APIInvokeFlowServiceRole61C02E4B", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "MODEL_REGION": "us-east-1", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIInvokeFlowServiceRole61C02E4B", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIInvokeFlowServiceRole61C02E4B": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIInvokeFlowServiceRoleDefaultPolicyF59A1D3B": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "bedrock:*", + "logs:*", + "aws-marketplace:Subscribe", + "aws-marketplace:Unsubscribe", + "aws-marketplace:ViewSubscriptions", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIInvokeFlowServiceRoleDefaultPolicyF59A1D3B", + "Roles": [ + { + "Ref": "APIInvokeFlowServiceRole61C02E4B", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIListChats12807275": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIListChatsServiceRoleDefaultPolicyD6E68E36", + "APIListChatsServiceRole336654B4", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIListChatsServiceRole336654B4", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIListChatsServiceRole336654B4": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIListChatsServiceRoleDefaultPolicyD6E68E36": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIListChatsServiceRoleDefaultPolicyD6E68E36", + "Roles": [ + { + "Ref": "APIListChatsServiceRole336654B4", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIListMessages536ED2CC": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIListMessagesServiceRoleDefaultPolicy8E659637", + "APIListMessagesServiceRole4C0AC764", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIListMessagesServiceRole4C0AC764", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIListMessagesServiceRole4C0AC764": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIListMessagesServiceRoleDefaultPolicy8E659637": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIListMessagesServiceRoleDefaultPolicy8E659637", + "Roles": [ + { + "Ref": "APIListMessagesServiceRole4C0AC764", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIListSystemContexts08AE4129": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIListSystemContextsServiceRoleDefaultPolicy40C08CBE", + "APIListSystemContextsServiceRole60484AB7", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIListSystemContextsServiceRole60484AB7", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIListSystemContextsServiceRole60484AB7": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIListSystemContextsServiceRoleDefaultPolicy40C08CBE": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIListSystemContextsServiceRoleDefaultPolicy40C08CBE", + "Roles": [ + { + "Ref": "APIListSystemContextsServiceRole60484AB7", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIListVideoJobsBF828ABB": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIListVideoJobsServiceRoleDefaultPolicy546B8673", + "APIListVideoJobsServiceRole171468E3", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "BUCKET_NAME": { + "Ref": "APIFileBucket8FB29855", + }, + "COPY_VIDEO_JOB_FUNCTION_ARN": { + "Fn::GetAtt": [ + "APICopyVideoJobB772026B", + "Arn", + ], + }, + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "IMAGE_GENERATION_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "MODEL_REGION": "us-east-1", + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + "VIDEO_BUCKET_REGION_MAP": { + "Fn::Join": [ + "", + [ + "{"us-east-1":"", + { + "Fn::ImportValue": "VideoTmpBucketStackus-east-1:ExportsOutputRefBucket83908E7781C90AC0", + }, + ""}", + ], + ], + }, + "VIDEO_GENERATION_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIListVideoJobsServiceRole171468E3", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIListVideoJobsServiceRole171468E3": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIListVideoJobsServiceRoleDefaultPolicy546B8673": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "APICopyVideoJobB772026B", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APICopyVideoJobB772026B", + "Arn", + ], + }, + ":*", + ], + ], + }, + ], + }, + { + "Action": [ + "bedrock:*", + "logs:*", + "aws-marketplace:Subscribe", + "aws-marketplace:Unsubscribe", + "aws-marketplace:ViewSubscriptions", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIListVideoJobsServiceRoleDefaultPolicy546B8673", + "Roles": [ + { + "Ref": "APIListVideoJobsServiceRole171468E3", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIOptimizePromptFunctionC14E6D1B": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIOptimizePromptFunctionServiceRoleDefaultPolicyD6B88C0F", + "APIOptimizePromptFunctionServiceRole408208AA", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "MODEL_REGION": "us-east-1", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIOptimizePromptFunctionServiceRole408208AA", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIOptimizePromptFunctionServiceRole408208AA": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIOptimizePromptFunctionServiceRoleDefaultPolicyD6B88C0F": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "bedrock:*", + "logs:*", + "aws-marketplace:Subscribe", + "aws-marketplace:Unsubscribe", + "aws-marketplace:ViewSubscriptions", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIOptimizePromptFunctionServiceRoleDefaultPolicyD6B88C0F", + "Roles": [ + { + "Ref": "APIOptimizePromptFunctionServiceRole408208AA", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIPredict09E4E4FF": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIPredictServiceRoleDefaultPolicy0D908F6B", + "APIPredictServiceRole6B8A4E2C", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "GUARDRAIL_IDENTIFIER": { + "Fn::ImportValue": "GuardrailStack:ExportsOutputFnGetAttGuardrailguardrail03A76CF4GuardrailIdDBA991AF", + }, + "GUARDRAIL_VERSION": "DRAFT", + "IMAGE_GENERATION_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "MODEL_REGION": "us-east-1", + "VIDEO_GENERATION_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIPredictServiceRole6B8A4E2C", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIPredictServiceRole6B8A4E2C": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIPredictServiceRoleDefaultPolicy0D908F6B": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "bedrock:*", + "logs:*", + "aws-marketplace:Subscribe", + "aws-marketplace:Unsubscribe", + "aws-marketplace:ViewSubscriptions", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIPredictServiceRoleDefaultPolicy0D908F6B", + "Roles": [ + { + "Ref": "APIPredictServiceRole6B8A4E2C", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIPredictStream44DDBC25": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIPredictStreamServiceRoleDefaultPolicy07B1CCF0", + "APIPredictStreamServiceRole2B2C7355", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "BUCKET_NAME": { + "Ref": "APIFileBucket8FB29855", + }, + "BUILTIN_AGENTS_JSON": { + "Fn::GetAtt": [ + "AgentRemoteOutputs90CFA880", + "Agents", + ], + }, + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "CUSTOM_AGENTS_JSON": "[]", + "GUARDRAIL_IDENTIFIER": { + "Fn::ImportValue": "GuardrailStack:ExportsOutputFnGetAttGuardrailguardrail03A76CF4GuardrailIdDBA991AF", + }, + "GUARDRAIL_VERSION": "DRAFT", + "IMAGE_GENERATION_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "KNOWLEDGE_BASE_ID": { + "Fn::ImportValue": "RagKnowledgeBaseStack:ExportsOutputRefKnowledgeBaseD054384B", + }, + "MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "MODEL_REGION": "us-east-1", + "QUERY_DECOMPOSITION_ENABLED": "false", + "RERANKING_MODEL_ID": "", + "USER_POOL_CLIENT_ID": { + "Ref": "AuthUserPoolclientA74673A9", + }, + "USER_POOL_ID": { + "Ref": "AuthUserPool8115E87F", + }, + "USER_POOL_PROXY_ENDPOINT": "", + "VIDEO_GENERATION_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "MemorySize": 256, + "Role": { + "Fn::GetAtt": [ + "APIPredictStreamServiceRole2B2C7355", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIPredictStreamServiceRole2B2C7355": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIPredictStreamServiceRoleDefaultPolicy07B1CCF0": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APIFileBucket8FB29855", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "bedrock:*", + "logs:*", + "aws-marketplace:Subscribe", + "aws-marketplace:Unsubscribe", + "aws-marketplace:ViewSubscriptions", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIPredictStreamServiceRoleDefaultPolicy07B1CCF0", + "Roles": [ + { + "Ref": "APIPredictStreamServiceRole2B2C7355", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIPredictTitle95F64FA4": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIPredictTitleServiceRoleDefaultPolicy2FBAD754", + "APIPredictTitleServiceRoleAC90BDCD", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "GUARDRAIL_IDENTIFIER": { + "Fn::ImportValue": "GuardrailStack:ExportsOutputFnGetAttGuardrailguardrail03A76CF4GuardrailIdDBA991AF", + }, + "GUARDRAIL_VERSION": "DRAFT", + "IMAGE_GENERATION_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "MODEL_REGION": "us-east-1", + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + "VIDEO_GENERATION_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIPredictTitleServiceRoleAC90BDCD", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIPredictTitleServiceRoleAC90BDCD": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIPredictTitleServiceRoleDefaultPolicy2FBAD754": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + { + "Action": [ + "bedrock:*", + "logs:*", + "aws-marketplace:Subscribe", + "aws-marketplace:Unsubscribe", + "aws-marketplace:ViewSubscriptions", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIPredictTitleServiceRoleDefaultPolicy2FBAD754", + "Roles": [ + { + "Ref": "APIPredictTitleServiceRoleAC90BDCD", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateChatTitleF8FCA547": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIUpdateChatTitleServiceRoleDefaultPolicyCE257C4E", + "APIUpdateChatTitleServiceRoleDF447D6E", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIUpdateChatTitleServiceRoleDF447D6E", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateChatTitleServiceRoleDF447D6E": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateChatTitleServiceRoleDefaultPolicyCE257C4E": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIUpdateChatTitleServiceRoleDefaultPolicyCE257C4E", + "Roles": [ + { + "Ref": "APIUpdateChatTitleServiceRoleDF447D6E", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateFeedback2F9276A1": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIUpdateFeedbackServiceRoleDefaultPolicyB3422366", + "APIUpdateFeedbackServiceRole1A31F75D", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIUpdateFeedbackServiceRole1A31F75D", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateFeedbackServiceRole1A31F75D": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateFeedbackServiceRoleDefaultPolicyB3422366": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIUpdateFeedbackServiceRoleDefaultPolicyB3422366", + "Roles": [ + { + "Ref": "APIUpdateFeedbackServiceRole1A31F75D", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateSystemContextTitle5806E033": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "APIUpdateSystemContextTitleServiceRoleDefaultPolicy5EA8F0B5", + "APIUpdateSystemContextTitleServiceRoleAE4E6BD7", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TABLE_NAME": { + "Ref": "DatabaseTableF104A135", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "APIUpdateSystemContextTitleServiceRoleAE4E6BD7", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateSystemContextTitleServiceRoleAE4E6BD7": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "APIUpdateSystemContextTitleServiceRoleDefaultPolicy5EA8F0B5": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DatabaseTableF104A135", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "APIUpdateSystemContextTitleServiceRoleDefaultPolicy5EA8F0B5", + "Roles": [ + { + "Ref": "APIUpdateSystemContextTitleServiceRoleAE4E6BD7", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AgentBuilder03642B5C": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AgentBuilderServiceRoleDefaultPolicy44C33621", + "AgentBuilderServiceRole8C5962B5", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "MODEL_REGION": "us-east-1", + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + "USER_POOL_ID": { + "Ref": "AuthUserPool8115E87F", + }, + }, + }, + "Handler": "index.handler", + "MemorySize": 1024, + "Role": { + "Fn::GetAtt": [ + "AgentBuilderServiceRole8C5962B5", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "AgentBuilderAuthorizerE8188502": { + "DeletionPolicy": "Delete", + "Properties": { + "IdentitySource": "method.request.header.Authorization", + "Name": "GenerativeAiUseCasesStackAgentBuilderAuthorizer2ED522E1", + "ProviderARNs": [ + { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + ], + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + "Type": "COGNITO_USER_POOLS", + }, + "Type": "AWS::ApiGateway::Authorizer", + "UpdateReplacePolicy": "Delete", + }, + "AgentBuilderServiceRole8C5962B5": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "AgentBuilderServiceRoleDefaultPolicy44C33621": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + { + "Action": [ + "bedrock:*", + "logs:*", + ], + "Effect": "Allow", + "Resource": "*", + }, + { + "Action": "cognito-idp:AdminGetUser", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "AgentBuilderServiceRoleDefaultPolicy44C33621", + "Roles": [ + { + "Ref": "AgentBuilderServiceRole8C5962B5", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreAgentCoreRuntimePolicyA2A56192": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "bedrock-agentcore:InvokeAgentRuntime", + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "GenericAgentCoreRuntimeArn", + ], + }, + "*", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "AgentBuilderAgentCoreRuntimeArn", + ], + }, + "*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "AgentCoreAgentCoreRuntimePolicyA2A56192", + "Roles": [ + { + "Ref": "AuthIdentityPoolAuthenticatedRole09311B20", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreRemoteOutputsDE8C59C9": { + "DeletionPolicy": "Delete", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsMyProviderframeworkonEvent918C4244", + "Arn", + ], + }, + "randomString": "RANDOM-STRING-REPLACED", + "regionName": "us-east-1", + "stackName": "AgentCoreStack", + }, + "Type": "AWS::CloudFormation::CustomResource", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreRemoteOutputsMyHandler51F86461": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AgentCoreRemoteOutputsMyHandlerServiceRoleDefaultPolicy95FB1E7B", + "AgentCoreRemoteOutputsMyHandlerServiceRole515D2285", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Handler": "remote-outputs.on_event", + "Role": { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsMyHandlerServiceRole515D2285", + "Arn", + ], + }, + "Runtime": "python3.9", + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreRemoteOutputsMyHandlerServiceRole515D2285": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreRemoteOutputsMyHandlerServiceRoleDefaultPolicy95FB1E7B": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "cloudformation:DescribeStacks", + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "AgentCoreRemoteOutputsMyHandlerServiceRoleDefaultPolicy95FB1E7B", + "Roles": [ + { + "Ref": "AgentCoreRemoteOutputsMyHandlerServiceRole515D2285", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreRemoteOutputsMyProviderframeworkonEvent918C4244": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AgentCoreRemoteOutputsMyProviderframeworkonEventServiceRoleDefaultPolicy59F6CBAE", + "AgentCoreRemoteOutputsMyProviderframeworkonEventServiceRole230DBF5F", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": "AWS CDK resource provider framework - onEvent (GenerativeAiUseCasesStack/AgentCoreRemoteOutputs/MyProvider)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsMyHandler51F86461", + "Arn", + ], + }, + }, + }, + "Handler": "framework.onEvent", + "LoggingConfig": { + "ApplicationLogLevel": "FATAL", + "LogFormat": "JSON", + }, + "Role": { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsMyProviderframeworkonEventServiceRole230DBF5F", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreRemoteOutputsMyProviderframeworkonEventLogRetention1B283935": { + "DeletionPolicy": "Delete", + "Properties": { + "LogGroupName": { + "Fn::Join": [ + "", + [ + "/aws/lambda/", + { + "Ref": "AgentCoreRemoteOutputsMyProviderframeworkonEvent918C4244", + }, + ], + ], + }, + "RetentionInDays": 1, + "ServiceToken": { + "Fn::GetAtt": [ + "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", + "Arn", + ], + }, + }, + "Type": "Custom::LogRetention", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreRemoteOutputsMyProviderframeworkonEventServiceRole230DBF5F": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "AgentCoreRemoteOutputsMyProviderframeworkonEventServiceRoleDefaultPolicy59F6CBAE": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsMyHandler51F86461", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsMyHandler51F86461", + "Arn", + ], + }, + ":*", + ], + ], + }, + ], + }, + { + "Action": "lambda:GetFunction", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsMyHandler51F86461", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "AgentCoreRemoteOutputsMyProviderframeworkonEventServiceRoleDefaultPolicy59F6CBAE", + "Roles": [ + { + "Ref": "AgentCoreRemoteOutputsMyProviderframeworkonEventServiceRole230DBF5F", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AgentRemoteOutputs90CFA880": { + "DeletionPolicy": "Delete", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "AgentRemoteOutputsMyProviderframeworkonEventF9C28988", + "Arn", + ], + }, + "randomString": "RANDOM-STRING-REPLACED", + "regionName": "us-east-1", + "stackName": "WebSearchAgentStack", + }, + "Type": "AWS::CloudFormation::CustomResource", + "UpdateReplacePolicy": "Delete", + }, + "AgentRemoteOutputsMyHandler04E7AFB1": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AgentRemoteOutputsMyHandlerServiceRoleDefaultPolicy9D946EF9", + "AgentRemoteOutputsMyHandlerServiceRole44123FB4", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Handler": "remote-outputs.on_event", + "Role": { + "Fn::GetAtt": [ + "AgentRemoteOutputsMyHandlerServiceRole44123FB4", + "Arn", + ], + }, + "Runtime": "python3.9", + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "AgentRemoteOutputsMyHandlerServiceRole44123FB4": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "AgentRemoteOutputsMyHandlerServiceRoleDefaultPolicy9D946EF9": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "cloudformation:DescribeStacks", + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "AgentRemoteOutputsMyHandlerServiceRoleDefaultPolicy9D946EF9", + "Roles": [ + { + "Ref": "AgentRemoteOutputsMyHandlerServiceRole44123FB4", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AgentRemoteOutputsMyProviderframeworkonEventF9C28988": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AgentRemoteOutputsMyProviderframeworkonEventServiceRoleDefaultPolicy5E7D4C8A", + "AgentRemoteOutputsMyProviderframeworkonEventServiceRoleFE28477D", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": "AWS CDK resource provider framework - onEvent (GenerativeAiUseCasesStack/AgentRemoteOutputs/MyProvider)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "AgentRemoteOutputsMyHandler04E7AFB1", + "Arn", + ], + }, + }, + }, + "Handler": "framework.onEvent", + "LoggingConfig": { + "ApplicationLogLevel": "FATAL", + "LogFormat": "JSON", + }, + "Role": { + "Fn::GetAtt": [ + "AgentRemoteOutputsMyProviderframeworkonEventServiceRoleFE28477D", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "AgentRemoteOutputsMyProviderframeworkonEventLogRetention05F81B10": { + "DeletionPolicy": "Delete", + "Properties": { + "LogGroupName": { + "Fn::Join": [ + "", + [ + "/aws/lambda/", + { + "Ref": "AgentRemoteOutputsMyProviderframeworkonEventF9C28988", + }, + ], + ], + }, + "RetentionInDays": 1, + "ServiceToken": { + "Fn::GetAtt": [ + "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", + "Arn", + ], + }, + }, + "Type": "Custom::LogRetention", + "UpdateReplacePolicy": "Delete", + }, + "AgentRemoteOutputsMyProviderframeworkonEventServiceRoleDefaultPolicy5E7D4C8A": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "AgentRemoteOutputsMyHandler04E7AFB1", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AgentRemoteOutputsMyHandler04E7AFB1", + "Arn", + ], + }, + ":*", + ], + ], + }, + ], + }, + { + "Action": "lambda:GetFunction", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "AgentRemoteOutputsMyHandler04E7AFB1", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "AgentRemoteOutputsMyProviderframeworkonEventServiceRoleDefaultPolicy5E7D4C8A", + "Roles": [ + { + "Ref": "AgentRemoteOutputsMyProviderframeworkonEventServiceRoleFE28477D", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AgentRemoteOutputsMyProviderframeworkonEventServiceRoleFE28477D": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "ApiBuildWeb746ABF13": { + "DeletionPolicy": "Delete", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c446591C4101F8", + "Arn", + ], + }, + "buildCommands": [ + "npm ci", + "npm run web:build", + ], + "codeBuildProjectName": { + "Ref": "ApiBuildWebProjectDF2CE9D0", + }, + "destinationBucketName": "cdk-hnb659fds-assets-123456890123-us-east-1", + "environment": { + "NODE_OPTIONS": "--max-old-space-size=4096", + "VITE_APP_AGENT_CORE_AGENT_BUILDER_ENABLED": "true", + "VITE_APP_AGENT_CORE_AGENT_BUILDER_RUNTIME": { + "Fn::Join": [ + "", + [ + "{"name":"", + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "AgentBuilderAgentCoreRuntimeName", + ], + }, + "","arn":"", + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "AgentBuilderAgentCoreRuntimeArn", + ], + }, + "","description":"Agent Core Runtime for AgentBuilder"}", + ], + ], + }, + "VITE_APP_AGENT_CORE_ENABLED": "true", + "VITE_APP_AGENT_CORE_EXTERNAL_RUNTIMES": "[]", + "VITE_APP_AGENT_CORE_GENERIC_RUNTIME": { + "Fn::Join": [ + "", + [ + "{"name":"", + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "GenericAgentCoreRuntimeName", + ], + }, + "","arn":"", + { + "Fn::GetAtt": [ + "AgentCoreRemoteOutputsDE8C59C9", + "GenericAgentCoreRuntimeArn", + ], + }, + "","description":"Generic Agent Core Runtime for custom agents"}", + ], + ], + }, + "VITE_APP_AGENT_ENABLED": "true", + "VITE_APP_API_ENDPOINT": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "APIApiFFA96F67", + }, + ".execute-api.us-east-1.", + { + "Ref": "AWS::URLSuffix", + }, + "/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + "/", + ], + ], + }, + "VITE_APP_BRANDING_LOGO_PATH": "", + "VITE_APP_BRANDING_TITLE": "", + "VITE_APP_BUILTIN_AGENTS_JSON": { + "Fn::GetAtt": [ + "AgentRemoteOutputs90CFA880", + "Agents", + ], + }, + "VITE_APP_COGNITO_IDENTITY_POOL_PROXY_ENDPOINT": "", + "VITE_APP_COGNITO_USER_POOL_PROXY_ENDPOINT": "", + "VITE_APP_CUSTOM_AGENTS_JSON": "[]", + "VITE_APP_ENDPOINT_NAMES": "[]", + "VITE_APP_FLOWS": "[]", + "VITE_APP_FLOW_STREAM_FUNCTION_ARN": { + "Fn::GetAtt": [ + "APIInvokeFlow03786D76", + "Arn", + ], + }, + "VITE_APP_HIDDEN_USE_CASES": "{}", + "VITE_APP_IDENTITY_POOL_ID": { + "Ref": "AuthIdentityPool659E7F64", + }, + "VITE_APP_IMAGE_MODEL_IDS": "[{"modelId":"stability.stable-diffusion-xl-v1","region":"us-east-1"}]", + "VITE_APP_INLINE_AGENTS": "false", + "VITE_APP_MCP_ENABLED": "false", + "VITE_APP_MCP_ENDPOINT": "", + "VITE_APP_MCP_SERVERS_CONFIG": "{"time":{"metadata":{"category":"Utility","description":"Provides current time and date functionality"}},"aws-knowledge-mcp-server":{"metadata":{"category":"AWS","description":"AWS Knowledge Base MCP server for enterprise knowledge access"}},"awslabs.aws-documentation-mcp-server":{"metadata":{"category":"AWS","description":"Access AWS documentation and guides"}},"awslabs.cdk-mcp-server":{"metadata":{"category":"AWS","description":"AWS CDK code generation and assistance"}},"awslabs.aws-diagram-mcp-server":{"metadata":{"category":"AWS","description":"Generate AWS architecture diagrams"}},"awslabs.nova-canvas-mcp-server":{"metadata":{"category":"AI/ML","description":"Amazon Nova Canvas image generation"}},"tavily-search":{"metadata":{"category":"Search","description":"Web search and research capabilities powered by Tavily"}},"tavily-gateway":{"metadata":{"category":"Search","description":"Web search and research capabilities powered by Tavily"}}}", + "VITE_APP_MFA_ENABLED": "true", + "VITE_APP_MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", + "VITE_APP_MODEL_REGION": "us-east-1", + "VITE_APP_OPTIMIZE_PROMPT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "APIOptimizePromptFunctionC14E6D1B", + "Arn", + ], + }, + "VITE_APP_PREDICT_STREAM_FUNCTION_ARN": { + "Fn::GetAtt": [ + "APIPredictStream44DDBC25", + "Arn", + ], + }, + "VITE_APP_RAG_ENABLED": "true", + "VITE_APP_RAG_KNOWLEDGE_BASE_ENABLED": "true", + "VITE_APP_REGION": "us-east-1", + "VITE_APP_SAMLAUTH_ENABLED": "false", + "VITE_APP_SAML_COGNITO_DOMAIN_NAME": "", + "VITE_APP_SAML_COGNITO_FEDERATED_IDENTITY_PROVIDER_NAME": "", + "VITE_APP_SELF_SIGN_UP_ENABLED": "true", + "VITE_APP_SPEECH_TO_SPEECH_EVENT_API_ENDPOINT": { + "Fn::Join": [ + "", + [ + "https://", + { + "Fn::GetAtt": [ + "SpeechToSpeechEventApi1E2E9AB4", + "Dns.Http", + ], + }, + "/event", + ], + ], + }, + "VITE_APP_SPEECH_TO_SPEECH_MODEL_IDS": "[{"modelId":"amazon.nova-sonic-v1:0","region":"us-east-1"}]", + "VITE_APP_SPEECH_TO_SPEECH_NAMESPACE": "speech-to-speech", + "VITE_APP_USER_POOL_CLIENT_ID": { + "Ref": "AuthUserPoolclientA74673A9", + }, + "VITE_APP_USER_POOL_ID": { + "Ref": "AuthUserPool8115E87F", + }, + "VITE_APP_USE_CASE_BUILDER_ENABLED": "true", + "VITE_APP_VIDEO_MODEL_IDS": "[{"modelId":"amazon.nova-reel-v1:0","region":"us-east-1"}]", + }, + "outputEnvFile": false, + "outputSourceDirectory": "../packages/web/dist", + "sources": [ + { + "extractPath": "..", + "sourceBucketName": "cdk-hnb659fds-assets-123456890123-us-east-1", + "sourceObjectKey": "HASH-REPLACED.zip", + }, + ], + "type": "NodejsBuild", + "workingDirectory": "..", + }, + "Type": "Custom::CDKNodejsBuild", + "UpdateReplacePolicy": "Delete", + }, + "ApiBuildWebDeployAwsCliLayer187512BE": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "ApiBuildWeb746ABF13", + ], + "Properties": { + "Content": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": "/opt/awscli/aws", + }, + "Type": "AWS::Lambda::LayerVersion", + "UpdateReplacePolicy": "Delete", + }, + "ApiBuildWebDeployCustomResource512MiBE7E7D353": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "ApiBuildWeb746ABF13", + ], + "Properties": { + "DestinationBucketName": { + "Ref": "ApiWebS3Bucket26EF98D6", + }, + "DistributionId": { + "Ref": "ApiWebCloudFrontDistributionA115FBC3", + }, + "OutputObjectKeys": true, + "Prune": true, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiB6723FB92", + "Arn", + ], + }, + "SourceBucketNames": [ + "cdk-hnb659fds-assets-123456890123-us-east-1", + ], + "SourceObjectKeys": [ + { + "Fn::GetAtt": [ + "ApiBuildWeb746ABF13", + "destinationObjectKey", + ], + }, + ], + "WaitForDistributionInvalidation": true, + }, + "Type": "Custom::CDKBucketDeployment", + "UpdateReplacePolicy": "Delete", + }, + "ApiBuildWebProjectDF2CE9D0": { + "DeletionPolicy": "Delete", + "Properties": { + "Artifacts": { + "Type": "NO_ARTIFACTS", + }, + "Cache": { + "Type": "NO_CACHE", + }, + "EncryptionKey": "alias/aws/s3", + "Environment": { + "ComputeType": "BUILD_GENERAL1_MEDIUM", + "Image": "aws/codebuild/standard:7.0", + "ImagePullCredentialsType": "CODEBUILD", + "PrivilegedMode": false, + "Type": "LINUX_CONTAINER", + }, + "ServiceRole": { + "Fn::GetAtt": [ + "ApiBuildWebProjectRole8A770CFE", + "Arn", + ], + }, + "Source": { + "BuildSpec": "{ + "version": "0.2", + "env": { + "shell": "bash" + }, + "phases": { + "install": { + "runtime-versions": { + "nodejs": 18 + } + }, + "build": { + "commands": [ + "current_dir=$(pwd)", + "\\necho \\"$input\\"\\nfor obj in $(echo \\"$input\\" | jq -r '.[] | @base64'); do\\n decoded=$(echo \\"$obj\\" | base64 --decode)\\n assetUrl=$(echo \\"$decoded\\" | jq -r '.assetUrl')\\n extractPath=$(echo \\"$decoded\\" | jq -r '.extractPath')\\n commands=$(echo \\"$decoded\\" | jq -r '.commands')\\n\\n # Download the zip file\\n aws s3 cp \\"$assetUrl\\" temp.zip\\n\\n # Extract the zip file to the extractPath directory\\n mkdir -p \\"$extractPath\\"\\n unzip temp.zip -d \\"$extractPath\\"\\n\\n # Remove the zip file\\n rm temp.zip\\n\\n # Run the specified commands in the extractPath directory\\n cd \\"$extractPath\\"\\n ls -la\\n eval \\"$commands\\"\\n cd \\"$current_dir\\"\\n ls -la\\ndone\\n ", + "ls -la", + "cd \\"$workingDirectory\\"", + "eval \\"$buildCommands\\"", + "ls -la", + "cd \\"$current_dir\\"", + "cd \\"$outputSourceDirectory\\"", + "zip -r output.zip ./", + "aws s3 cp output.zip \\"s3://$destinationBucketName/$destinationObjectKey\\"", + "\\nif [[ $outputEnvFile == \\"true\\" ]]\\nthen\\n # Split the comma-separated string into an array\\n for var_name in \${envNames//,/ }\\n do\\n echo \\"Element: $var_name\\"\\n var_value=\\"\${!var_name}\\"\\n echo \\"$var_name=$var_value\\" >> tmp.env\\n done\\n\\n aws s3 cp tmp.env \\"s3://$destinationBucketName/$envFileKey\\"\\nfi\\n " + ] + }, + "post_build": { + "commands": [ + "echo Build completed on \`date\`", + "\\nSTATUS='SUCCESS'\\nif [ $CODEBUILD_BUILD_SUCCEEDING -ne 1 ] # Test if the build is failing\\nthen\\nSTATUS='FAILED'\\nREASON=\\"NodejsBuild failed. See CloudWatch Log stream for the detailed reason: \\nhttps://$AWS_REGION.console.aws.amazon.com/cloudwatch/home?region=$AWS_REGION#logsV2:log-groups/log-group/\\\\$252Faws\\\\$252Fcodebuild\\\\$252F$projectName/log-events/$CODEBUILD_LOG_PATH\\"\\nfi\\ncat < payload.json\\n{\\n \\"StackId\\": \\"$stackId\\",\\n \\"RequestId\\": \\"$requestId\\",\\n \\"LogicalResourceId\\":\\"$logicalResourceId\\",\\n \\"PhysicalResourceId\\": \\"$logicalResourceId\\",\\n \\"Status\\": \\"$STATUS\\",\\n \\"Reason\\": \\"$REASON\\",\\n \\"Data\\": {\\n \\"destinationObjectKey\\": \\"$destinationObjectKey\\",\\n \\"envFileKey\\": \\"$envFileKey\\"\\n }\\n}\\nEOF\\ncurl -v -i -X PUT -H 'Content-Type:' -d \\"@payload.json\\" \\"$responseURL\\"\\n " + ] + } + } +}", + "Type": "NO_SOURCE", + }, + }, + "Type": "AWS::CodeBuild::Project", + "UpdateReplacePolicy": "Delete", + }, + "ApiBuildWebProjectRole8A770CFE": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "ApiBuildWebProjectRoleDefaultPolicyEA537DDE": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":logs:us-east-1:123456890123:log-group:/aws/codebuild/", + { + "Ref": "ApiBuildWebProjectDF2CE9D0", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":logs:us-east-1:123456890123:log-group:/aws/codebuild/", + { + "Ref": "ApiBuildWebProjectDF2CE9D0", + }, + ":*", + ], + ], + }, + ], + }, + { + "Action": [ + "codebuild:CreateReportGroup", + "codebuild:CreateReport", + "codebuild:UpdateReport", + "codebuild:BatchPutTestCases", + "codebuild:BatchPutCodeCoverages", + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":codebuild:us-east-1:123456890123:report-group/", + { + "Ref": "ApiBuildWebProjectDF2CE9D0", + }, + "-*", + ], + ], + }, + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "ApiBuildWebProjectRoleDefaultPolicyEA537DDE", + "Roles": [ + { + "Ref": "ApiBuildWebProjectRole8A770CFE", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "ApiSecurityHeadersPolicyA2894EB4": { + "DeletionPolicy": "Delete", + "Properties": { + "ResponseHeadersPolicyConfig": { + "Name": "GenerativeAiUseCasesStackApiSecurityHeadersPolicyFF62FE6B", + "SecurityHeadersConfig": { + "ContentSecurityPolicy": { + "ContentSecurityPolicy": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https:; media-src 'self' blob: https://*.amazonaws.com; connect-src 'self' https://*.amazonaws.com https://*.amazoncognito.com wss://*.amazonaws.com:* https://*.on.aws https://raw.githubusercontent.com https://api.github.com; font-src 'self' https://fonts.gstatic.com data:; object-src 'none'; frame-ancestors 'none'; frame-src 'self' https://www.youtube.com/;", + "Override": true, + }, + "ContentTypeOptions": { + "Override": true, + }, + "FrameOptions": { + "FrameOption": "DENY", + "Override": true, + }, + "ReferrerPolicy": { + "Override": true, + "ReferrerPolicy": "strict-origin-when-cross-origin", + }, + "StrictTransportSecurity": { + "AccessControlMaxAgeSec": 63072000, + "IncludeSubdomains": true, + "Override": true, + "Preload": true, + }, + "XSSProtection": { + "ModeBlock": true, + "Override": true, + "Protection": true, + }, + }, + }, + }, + "Type": "AWS::CloudFront::ResponseHeadersPolicy", + "UpdateReplacePolicy": "Delete", + }, + "ApiWafAssociation": { + "DeletionPolicy": "Delete", + "Properties": { + "ResourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":apigateway:us-east-1::/restapis/", + { + "Ref": "APIApiFFA96F67", + }, + "/stages/", + { + "Ref": "APIApiDeploymentStageapiCD55D117", + }, + ], + ], + }, + "WebACLArn": { + "Fn::GetAtt": [ + "RegionalWafWebAclRegionalWaf7F1BE9A6", + "Arn", + ], + }, + }, + "Type": "AWS::WAFv2::WebACLAssociation", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebCloudFrontDistributionA115FBC3": { + "DeletionPolicy": "Delete", + "Metadata": { + "cfn_nag": { + "rules_to_suppress": [ + { + "id": "W70", + "reason": "Since the distribution uses the CloudFront domain name, CloudFront automatically sets the security policy to TLSv1 regardless of the value of MinimumProtocolVersion", + }, + ], + }, + }, + "Properties": { + "DistributionConfig": { + "CustomErrorResponses": [ + { + "ErrorCode": 403, + "ResponseCode": 200, + "ResponsePagePath": "/index.html", + }, + { + "ErrorCode": 404, + "ResponseCode": 200, + "ResponsePagePath": "/index.html", + }, + ], + "DefaultCacheBehavior": { + "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", + "Compress": true, + "ResponseHeadersPolicyId": { + "Ref": "ApiSecurityHeadersPolicyA2894EB4", + }, + "TargetOriginId": "GenerativeAiUseCasesStackApiWebCloudFrontDistributionOrigin15479CB7B", + "ViewerProtocolPolicy": "redirect-to-https", + }, + "DefaultRootObject": "index.html", + "Enabled": true, + "HttpVersion": "http2", + "IPV6Enabled": true, + "Logging": { + "Bucket": { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketD22C7B67", + "RegionalDomainName", + ], + }, + }, + "Origins": [ + { + "DomainName": { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "RegionalDomainName", + ], + }, + "Id": "GenerativeAiUseCasesStackApiWebCloudFrontDistributionOrigin15479CB7B", + "OriginAccessControlId": { + "Fn::GetAtt": [ + "ApiWebCloudFrontOacD98C7E9E", + "Id", + ], + }, + "S3OriginConfig": { + "OriginAccessIdentity": "", + }, + }, + ], + "WebACLId": { + "Fn::ImportValue": "CloudFrontWafStack:ExportsOutputFnGetAttWebAclCloudFrontWafStackWebAclWebAclCloudFrontWafStackAC643995Arn2B4CD922", + }, + }, + }, + "Type": "AWS::CloudFront::Distribution", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebCloudFrontOacD98C7E9E": { + "DeletionPolicy": "Delete", + "Properties": { + "OriginAccessControlConfig": { + "Description": "Origin access control provisioned by aws-cloudfront-s3", + "Name": { + "Fn::Join": [ + "", + [ + "aws-cloudfront-s3-Web-", + { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Ref": "AWS::StackId", + }, + ], + }, + ], + }, + ], + ], + }, + "OriginAccessControlOriginType": "s3", + "SigningBehavior": "always", + "SigningProtocol": "sigv4", + }, + }, + "Type": "AWS::CloudFront::OriginAccessControl", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource38368B94": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "ApiWebCloudfrontLoggingBucketAccessLogPolicy7E5F08FD", + ], + "Properties": { + "BucketName": { + "Ref": "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB": { + "DeletionPolicy": "Delete", + "Metadata": { + "cfn_nag": { + "rules_to_suppress": [ + { + "id": "W35", + "reason": "This S3 bucket is used as the access logging bucket for another bucket", + }, + ], + }, + }, + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "ObjectWriter", + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + "VersioningConfiguration": { + "Status": "Enabled", + }, + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebCloudfrontLoggingBucketAccessLogPolicy7E5F08FD": { + "DeletionPolicy": "Delete", + "Properties": { + "Bucket": { + "Ref": "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": "s3:PutObject", + "Condition": { + "ArnLike": { + "aws:SourceArn": { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketD22C7B67", + "Arn", + ], + }, + }, + "StringEquals": { + "aws:SourceAccount": "123456890123", + }, + }, + "Effect": "Allow", + "Principal": { + "Service": "logging.s3.amazonaws.com", + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB", + "Arn", + ], + }, + "/*", + ], + ], + }, + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebCloudfrontLoggingBucketAutoDeleteObjectsCustomResourceBCE48929": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "ApiWebCloudfrontLoggingBucketPolicy30112EB3", + ], + "Properties": { + "BucketName": { + "Ref": "ApiWebCloudfrontLoggingBucketD22C7B67", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebCloudfrontLoggingBucketD22C7B67": { + "DeletionPolicy": "Delete", + "Properties": { + "AccessControl": "LogDeliveryWrite", + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "LoggingConfiguration": { + "DestinationBucketName": { + "Ref": "ApiWebCloudfrontLoggingBucketAccessLogFF7274FB", + }, + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "ObjectWriter", + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + "VersioningConfiguration": { + "Status": "Enabled", + }, + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebCloudfrontLoggingBucketPolicy30112EB3": { + "DeletionPolicy": "Delete", + "Properties": { + "Bucket": { + "Ref": "ApiWebCloudfrontLoggingBucketD22C7B67", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketD22C7B67", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketD22C7B67", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketD22C7B67", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebCloudfrontLoggingBucketD22C7B67", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebS3Bucket26EF98D6": { + "DeletionPolicy": "Delete", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "LifecycleConfiguration": { + "Rules": [ + { + "NoncurrentVersionTransitions": [ + { + "StorageClass": "GLACIER", + "TransitionInDays": 90, + }, + ], + "Status": "Enabled", + }, + ], + }, + "LoggingConfiguration": { + "DestinationBucketName": { + "Ref": "ApiWebS3LoggingBucket16DF416B", + }, + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "ObjectWriter", + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + { + "Key": "aws-cdk:cr-owned:656af005", + "Value": "true", + }, + ], + "VersioningConfiguration": { + "Status": "Enabled", + }, + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebS3BucketAutoDeleteObjectsCustomResource533BC7D3": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "ApiWebS3BucketPolicy9921124D", + ], + "Properties": { + "BucketName": { + "Ref": "ApiWebS3Bucket26EF98D6", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebS3BucketPolicy9921124D": { + "DeletionPolicy": "Delete", + "Metadata": { + "cfn_nag": { + "rules_to_suppress": [ + { + "id": "F16", + "reason": "Public website bucket policy requires a wildcard principal", + }, + ], + }, + }, + "Properties": { + "Bucket": { + "Ref": "ApiWebS3Bucket26EF98D6", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": "s3:GetObject", + "Condition": { + "StringEquals": { + "AWS:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":cloudfront::", + { + "Ref": "AWS::AccountId", + }, + ":distribution/", + { + "Ref": "ApiWebCloudFrontDistributionA115FBC3", + }, + ], + ], + }, + }, + }, + "Effect": "Allow", + "Principal": { + "Service": "cloudfront.amazonaws.com", + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + "/*", + ], + ], + }, + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringEquals": { + "AWS:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":cloudfront::", + { + "Ref": "AWS::AccountId", + }, + ":distribution/", + { + "Ref": "ApiWebCloudFrontDistributionA115FBC3", + }, + ], + ], + }, + }, + }, + "Effect": "Allow", + "Principal": { + "Service": "cloudfront.amazonaws.com", + }, + "Resource": { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebS3LoggingBucket16DF416B": { + "DeletionPolicy": "Delete", + "Metadata": { + "cfn_nag": { + "rules_to_suppress": [ + { + "id": "W35", + "reason": "This S3 bucket is used as the access logging bucket for another bucket", + }, + ], + }, + }, + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "ObjectWriter", + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + "VersioningConfiguration": { + "Status": "Enabled", + }, + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebS3LoggingBucketAutoDeleteObjectsCustomResourceB650DEF6": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "ApiWebS3LoggingBucketPolicyC0768FF8", + ], + "Properties": { + "BucketName": { + "Ref": "ApiWebS3LoggingBucket16DF416B", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "ApiWebS3LoggingBucketPolicyC0768FF8": { + "DeletionPolicy": "Delete", + "Properties": { + "Bucket": { + "Ref": "ApiWebS3LoggingBucket16DF416B", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebS3LoggingBucket16DF416B", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebS3LoggingBucket16DF416B", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebS3LoggingBucket16DF416B", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebS3LoggingBucket16DF416B", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": "s3:PutObject", + "Condition": { + "ArnLike": { + "aws:SourceArn": { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + }, + "StringEquals": { + "aws:SourceAccount": "123456890123", + }, + }, + "Effect": "Allow", + "Principal": { + "Service": "logging.s3.amazonaws.com", + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebS3LoggingBucket16DF416B", + "Arn", + ], + }, + "/*", + ], + ], + }, + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "AuthIdentityPool659E7F64": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AuthUserPoolclientA74673A9", + "AuthUserPool8115E87F", + ], + "Properties": { + "AllowUnauthenticatedIdentities": false, + "CognitoIdentityProviders": [ + { + "ClientId": { + "Ref": "AuthUserPoolclientA74673A9", + }, + "ProviderName": { + "Fn::Join": [ + "", + [ + "cognito-idp.us-east-1.", + { + "Ref": "AWS::URLSuffix", + }, + "/", + { + "Ref": "AuthUserPool8115E87F", + }, + ], + ], + }, + "ServerSideTokenCheck": true, + }, + ], + }, + "Type": "AWS::Cognito::IdentityPool", + "UpdateReplacePolicy": "Delete", + }, + "AuthIdentityPoolAuthenticatedRole09311B20": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AuthUserPoolclientA74673A9", + "AuthUserPool8115E87F", + ], + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "ForAnyValue:StringLike": { + "cognito-identity.amazonaws.com:amr": "authenticated", + }, + "StringEquals": { + "cognito-identity.amazonaws.com:aud": { + "Ref": "AuthIdentityPool659E7F64", + }, + }, + }, + "Effect": "Allow", + "Principal": { + "Federated": "cognito-identity.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "Description": { + "Fn::Join": [ + "", + [ + "Default Authenticated Role for Identity Pool ", + { + "Fn::GetAtt": [ + "AuthIdentityPool659E7F64", + "Name", + ], + }, + ], + ], + }, + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "AuthIdentityPoolAuthenticatedRoleDefaultPolicy2F0603CE": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AuthUserPoolclientA74673A9", + "AuthUserPool8115E87F", + ], + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "APIPredictStream44DDBC25", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APIPredictStream44DDBC25", + "Arn", + ], + }, + ":*", + ], + ], + }, + ], + }, + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "APIInvokeFlow03786D76", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APIInvokeFlow03786D76", + "Arn", + ], + }, + ":*", + ], + ], + }, + ], + }, + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "APIOptimizePromptFunctionC14E6D1B", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "APIOptimizePromptFunctionC14E6D1B", + "Arn", + ], + }, + ":*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "AuthIdentityPoolAuthenticatedRoleDefaultPolicy2F0603CE", + "Roles": [ + { + "Ref": "AuthIdentityPoolAuthenticatedRole09311B20", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AuthIdentityPoolDefaultRoleAttachmentA62DEBB8": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AuthUserPoolclientA74673A9", + "AuthUserPool8115E87F", + ], + "Properties": { + "IdentityPoolId": { + "Ref": "AuthIdentityPool659E7F64", + }, + "Roles": { + "authenticated": { + "Fn::GetAtt": [ + "AuthIdentityPoolAuthenticatedRole09311B20", + "Arn", + ], + }, + "unauthenticated": { + "Fn::GetAtt": [ + "AuthIdentityPoolUnauthenticatedRoleA421F307", + "Arn", + ], + }, + }, + }, + "Type": "AWS::Cognito::IdentityPoolRoleAttachment", + "UpdateReplacePolicy": "Delete", + }, + "AuthIdentityPoolUnauthenticatedRoleA421F307": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "AuthUserPoolclientA74673A9", + "AuthUserPool8115E87F", + ], + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "ForAnyValue:StringLike": { + "cognito-identity.amazonaws.com:amr": "unauthenticated", + }, + "StringEquals": { + "cognito-identity.amazonaws.com:aud": { + "Ref": "AuthIdentityPool659E7F64", + }, + }, + }, + "Effect": "Allow", + "Principal": { + "Federated": "cognito-identity.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "Description": { + "Fn::Join": [ + "", + [ + "Default Unauthenticated Role for Identity Pool ", + { + "Fn::GetAtt": [ + "AuthIdentityPool659E7F64", + "Name", + ], + }, + ], + ], + }, + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "AuthPollyPolicy8CB5A12A": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "polly:SynthesizeSpeech", + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "AuthPollyPolicy8CB5A12A", + "Roles": [ + { + "Ref": "AuthIdentityPoolAuthenticatedRole09311B20", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "AuthUserPool8115E87F": { + "DeletionPolicy": "Delete", + "Properties": { + "AccountRecoverySetting": { + "RecoveryMechanisms": [ + { + "Name": "verified_phone_number", + "Priority": 1, + }, + { + "Name": "verified_email", + "Priority": 2, + }, + ], + }, + "AdminCreateUserConfig": { + "AllowAdminCreateUserOnly": false, + }, + "AutoVerifiedAttributes": [ + "email", + ], + "EmailConfiguration": { + "EmailSendingAccount": "DEVELOPER", + "From": "no-reply@example.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":ses:us-east-1:123456890123:identity/example.com", + ], + ], + }, + }, + "EmailVerificationMessage": "The verification code to your new account is {####}", + "EmailVerificationSubject": "Verify your new account", + "EnabledMfas": [ + "EMAIL_OTP", + ], + "MfaConfiguration": "ON", + "Policies": { + "PasswordPolicy": { + "MinimumLength": 8, + "RequireNumbers": true, + "RequireSymbols": true, + "RequireUppercase": true, + }, + }, + "SmsVerificationMessage": "The verification code to your new account is {####}", + "UsernameAttributes": [ + "email", + ], + "VerificationMessageTemplate": { + "DefaultEmailOption": "CONFIRM_WITH_CODE", + "EmailMessage": "The verification code to your new account is {####}", + "EmailSubject": "Verify your new account", + "SmsMessage": "The verification code to your new account is {####}", + }, + }, + "Type": "AWS::Cognito::UserPool", + "UpdateReplacePolicy": "Delete", + }, + "AuthUserPoolclientA74673A9": { + "DeletionPolicy": "Delete", + "Properties": { + "AllowedOAuthFlows": [ + "implicit", + "code", + ], + "AllowedOAuthFlowsUserPoolClient": true, + "AllowedOAuthScopes": [ + "profile", + "phone", + "email", + "openid", + "aws.cognito.signin.user.admin", + ], + "CallbackURLs": [ + "https://example.com", + ], + "IdTokenValidity": 1440, + "SupportedIdentityProviders": [ + "COGNITO", + ], + "TokenValidityUnits": { + "IdToken": "minutes", + }, + "UserPoolId": { + "Ref": "AuthUserPool8115E87F", + }, + }, + "Type": "AWS::Cognito::UserPoolClient", + "UpdateReplacePolicy": "Delete", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBB049752D": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRoleDefaultPolicy0801355D", + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRole739949D8", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + }, + }, + "Handler": "index.handler", + "Layers": [ + { + "Ref": "RagDeployDocsAwsCliLayerB3D6B7FC", + }, + ], + "MemorySize": 1024, + "Role": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRole739949D8", + "Arn", + ], + }, + "Runtime": "python3.13", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRole739949D8": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRoleDefaultPolicy0801355D": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "RagDataSourceBucket091872DB", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "RagDataSourceBucket091872DB", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRoleDefaultPolicy0801355D", + "Roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBServiceRole739949D8", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiB6723FB92": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiBServiceRoleDefaultPolicy96C3E726", + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiBServiceRoleBA21DBC1", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + }, + }, + "Handler": "index.handler", + "Layers": [ + { + "Ref": "ApiBuildWebDeployAwsCliLayer187512BE", + }, + ], + "MemorySize": 512, + "Role": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiBServiceRoleBA21DBC1", + "Arn", + ], + }, + "Runtime": "python3.13", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiBServiceRoleBA21DBC1": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiBServiceRoleDefaultPolicy96C3E726": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1", + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":s3:::cdk-hnb659fds-assets-123456890123-us-east-1/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "ApiWebS3Bucket26EF98D6", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "cloudfront:GetInvalidation", + "cloudfront:CreateInvalidation", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiBServiceRoleDefaultPolicy96C3E726", + "Roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C512MiBServiceRoleBA21DBC1", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "APIFileBucket8FB29855", + }, + " S3 bucket.", + ], + ], + }, + "Handler": "index.handler", + "MemorySize": 128, + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:\${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "DatabaseStatsTable9C709761": { + "DeletionPolicy": "Delete", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S", + }, + { + "AttributeName": "userId", + "AttributeType": "S", + }, + ], + "BillingMode": "PAY_PER_REQUEST", + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH", + }, + { + "AttributeName": "userId", + "KeyType": "RANGE", + }, + ], + }, + "Type": "AWS::DynamoDB::Table", + "UpdateReplacePolicy": "Delete", + }, + "DatabaseTableF104A135": { + "DeletionPolicy": "Delete", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S", + }, + { + "AttributeName": "createdDate", + "AttributeType": "S", + }, + { + "AttributeName": "feedback", + "AttributeType": "S", + }, + ], + "BillingMode": "PAY_PER_REQUEST", + "GlobalSecondaryIndexes": [ + { + "IndexName": "FeedbackIndex", + "KeySchema": [ + { + "AttributeName": "feedback", + "KeyType": "HASH", + }, + ], + "Projection": { + "ProjectionType": "ALL", + }, + }, + ], + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH", + }, + { + "AttributeName": "createdDate", + "KeyType": "RANGE", + }, + ], + }, + "Type": "AWS::DynamoDB::Table", + "UpdateReplacePolicy": "Delete", + }, + "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", + "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:PutRetentionPolicy", + "logs:DeleteRetentionPolicy", + ], + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", + "Roles": [ + { + "Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c446591C4101F8": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c44659ServiceRoleDefaultPolicyCF8879D3", + "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c44659ServiceRoleCB01FBE6", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c44659ServiceRoleCB01FBE6", + "Arn", + ], + }, + "Runtime": "nodejs20.x", + "Timeout": 300, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c44659ServiceRoleCB01FBE6": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c44659ServiceRoleDefaultPolicyCF8879D3": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "codebuild:StartBuild", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ApiBuildWebProjectDF2CE9D0", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c44659ServiceRoleDefaultPolicyCF8879D3", + "Roles": [ + { + "Ref": "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c44659ServiceRoleCB01FBE6", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "RagAuthorizer1D577454": { + "DeletionPolicy": "Delete", + "Properties": { + "IdentitySource": "method.request.header.Authorization", + "Name": "GenerativeAiUseCasesStackRagAuthorizer01650AA3", + "ProviderARNs": [ + { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + ], + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + "Type": "COGNITO_USER_POOLS", + }, + "Type": "AWS::ApiGateway::Authorizer", + "UpdateReplacePolicy": "Delete", + }, + "RagDataSourceAccessLogsBucket19E6B2F2": { + "DeletionPolicy": "Delete", + "Properties": { + "AccessControl": "LogDeliveryWrite", + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "ObjectWriter", + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "RagDataSourceAccessLogsBucketAutoDeleteObjectsCustomResourceFF20BC83": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "RagDataSourceAccessLogsBucketPolicy62E1908B", + ], + "Properties": { + "BucketName": { + "Ref": "RagDataSourceAccessLogsBucket19E6B2F2", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "RagDataSourceAccessLogsBucketPolicy62E1908B": { + "DeletionPolicy": "Delete", + "Properties": { + "Bucket": { + "Ref": "RagDataSourceAccessLogsBucket19E6B2F2", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "RagDataSourceAccessLogsBucket19E6B2F2", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "RagDataSourceAccessLogsBucket19E6B2F2", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "RagDataSourceAccessLogsBucket19E6B2F2", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "RagDataSourceAccessLogsBucket19E6B2F2", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "RagDataSourceBucket091872DB": { + "DeletionPolicy": "Delete", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "LoggingConfiguration": { + "DestinationBucketName": { + "Ref": "RagDataSourceAccessLogsBucket19E6B2F2", + }, + "LogFilePrefix": "AccessLogs/", + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "ObjectWriter", + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + { + "Key": "aws-cdk:cr-owned:3a24f5d1", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "RagDataSourceBucketAutoDeleteObjectsCustomResource68020032": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "RagDataSourceBucketPolicyD4E0A087", + ], + "Properties": { + "BucketName": { + "Ref": "RagDataSourceBucket091872DB", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "RagDataSourceBucketPolicyD4E0A087": { + "DeletionPolicy": "Delete", + "Properties": { + "Bucket": { + "Ref": "RagDataSourceBucket091872DB", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "RagDataSourceBucket091872DB", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "RagDataSourceBucket091872DB", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "RagDataSourceBucket091872DB", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "RagDataSourceBucket091872DB", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "RagDataSourceRole3AFE601B": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "kendra.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "RagDataSourceRoleDefaultPolicyA0697035": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:ListBucket", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "RagDataSourceBucket091872DB", + }, + ], + ], + }, + }, + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "RagDataSourceBucket091872DB", + }, + "/*", + ], + ], + }, + }, + { + "Action": [ + "kendra:BatchPutDocument", + "kendra:BatchDeleteDocument", + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "RagKendraIndexFEF3924C", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "RagDataSourceRoleDefaultPolicyA0697035", + "Roles": [ + { + "Ref": "RagDataSourceRole3AFE601B", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "RagDeployDocsAwsCliLayerB3D6B7FC": { + "DeletionPolicy": "Delete", + "Properties": { + "Content": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Description": "/opt/awscli/aws", + }, + "Type": "AWS::Lambda::LayerVersion", + "UpdateReplacePolicy": "Delete", + }, + "RagDeployDocsCustomResource1024MiB43EE2539": { + "DeletionPolicy": "Delete", + "Properties": { + "DestinationBucketName": { + "Ref": "RagDataSourceBucket091872DB", + }, + "Exclude": [ + "AccessLogs/*", + "logs*", + "docs/bedrock-ug.pdf.metadata.json", + "docs/nova-ug.pdf.metadata.json", + ], + "OutputObjectKeys": true, + "Prune": false, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1024MiBB049752D", + "Arn", + ], + }, + "SourceBucketNames": [ + "cdk-hnb659fds-assets-123456890123-us-east-1", + ], + "SourceObjectKeys": [ + "HASH-REPLACED.zip", + ], + "WaitForDistributionInvalidation": true, + }, + "Type": "Custom::CDKBucketDeployment", + "UpdateReplacePolicy": "Delete", + }, + "RagKendraIndexFEF3924C": { + "DeletionPolicy": "Delete", + "Properties": { + "Edition": "DEVELOPER_EDITION", + "Name": "generative-ai-use-cases-index", + "RoleArn": { + "Fn::GetAtt": [ + "RagKendraIndexRole183684D3", + "Arn", + ], + }, + "UserContextPolicy": "USER_TOKEN", + "UserTokenConfigurations": [ + { + "JwtTokenTypeConfiguration": { + "GroupAttributeField": "cognito:groups", + "KeyLocation": "URL", + "URL": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "ProviderURL", + ], + }, + "/.well-known/jwks.json", + ], + ], + }, + "UserNameAttributeField": "cognito:username", + }, + }, + ], + }, + "Type": "AWS::Kendra::Index", + "UpdateReplacePolicy": "Delete", + }, + "RagKendraIndexRole183684D3": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "kendra.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/CloudWatchLogsFullAccess", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "RagKendraIndexRoleDefaultPolicyFC744A27": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "RagKendraIndexRoleDefaultPolicyFC744A27", + "Roles": [ + { + "Ref": "RagKendraIndexRole183684D3", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "RagKnowledgeBaseAuthorizerE73D3108": { + "DeletionPolicy": "Delete", + "Properties": { + "IdentitySource": "method.request.header.Authorization", + "Name": "GenerativeAiUseCasesStackRagKnowledgeBaseAuthorizer981836CD", + "ProviderARNs": [ + { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + ], + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + "Type": "COGNITO_USER_POOLS", + }, + "Type": "AWS::ApiGateway::Authorizer", + "UpdateReplacePolicy": "Delete", + }, + "RagKnowledgeBaseRetrieve67B5F652": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "RagKnowledgeBaseRetrieveServiceRoleDefaultPolicy83CCDA03", + "RagKnowledgeBaseRetrieveServiceRoleCB099EEC", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "KNOWLEDGE_BASE_ID": { + "Fn::ImportValue": "RagKnowledgeBaseStack:ExportsOutputRefKnowledgeBaseD054384B", + }, + "MODEL_REGION": "us-east-1", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "RagKnowledgeBaseRetrieveServiceRoleCB099EEC", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "RagKnowledgeBaseRetrieveServiceRoleCB099EEC": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "RagKnowledgeBaseRetrieveServiceRoleDefaultPolicy83CCDA03": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "bedrock:Retrieve", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:bedrock:us-east-1:123456890123:knowledge-base/", + { + "Fn::ImportValue": "RagKnowledgeBaseStack:ExportsOutputRefKnowledgeBaseD054384B", + }, + ], + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "RagKnowledgeBaseRetrieveServiceRoleDefaultPolicy83CCDA03", + "Roles": [ + { + "Ref": "RagKnowledgeBaseRetrieveServiceRoleCB099EEC", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "RagQuery46261080": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "RagQueryServiceRoleDefaultPolicy7B690C59", + "RagQueryServiceRoleF4A9010B", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "INDEX_ID": { + "Ref": "RagKendraIndexFEF3924C", + }, + "LANGUAGE": "ja", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "RagQueryServiceRoleF4A9010B", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "RagQueryServiceRoleDefaultPolicy7B690C59": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "kendra:Query", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "RagKendraIndexFEF3924C", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "RagQueryServiceRoleDefaultPolicy7B690C59", + "Roles": [ + { + "Ref": "RagQueryServiceRoleF4A9010B", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "RagQueryServiceRoleF4A9010B": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "RagRetrieve78B54C98": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "RagRetrieveServiceRoleDefaultPolicyDAF1DB92", + "RagRetrieveServiceRoleF745466E", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "INDEX_ID": { + "Ref": "RagKendraIndexFEF3924C", + }, + "LANGUAGE": "ja", + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "RagRetrieveServiceRoleF745466E", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "RagRetrieveServiceRoleDefaultPolicyDAF1DB92": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "kendra:Retrieve", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "RagKendraIndexFEF3924C", + "Arn", + ], + }, + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "RagRetrieveServiceRoleDefaultPolicyDAF1DB92", + "Roles": [ + { + "Ref": "RagRetrieveServiceRoleF745466E", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "RagRetrieveServiceRoleF745466E": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "RagS3DataSourceDEE56AB6": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "RagKendraIndexFEF3924C", + ], + "Properties": { + "DataSourceConfiguration": { + "S3Configuration": { + "BucketName": { + "Ref": "RagDataSourceBucket091872DB", + }, + "InclusionPrefixes": [ + "docs", + ], + }, + }, + "IndexId": { + "Fn::GetAtt": [ + "RagKendraIndexFEF3924C", + "Id", + ], + }, + "LanguageCode": "ja", + "Name": "s3-data-source", + "RoleArn": { + "Fn::GetAtt": [ + "RagDataSourceRole3AFE601B", + "Arn", + ], + }, + "Type": "S3", + }, + "Type": "AWS::Kendra::DataSource", + "UpdateReplacePolicy": "Delete", + }, + "RegionalWafWebAclRegionalWaf7F1BE9A6": { + "DeletionPolicy": "Delete", + "Properties": { + "DefaultAction": { + "Block": {}, + }, + "Name": "WebAcl-GenerativeAiUseCasesStackRegionalWaf2D5714A0", + "Rules": [ + { + "Action": { + "Allow": {}, + }, + "Name": "GeoMatchRuleRegionalWaf", + "Priority": 3, + "Statement": { + "GeoMatchStatement": { + "CountryCodes": [ + "JP", + ], + }, + }, + "VisibilityConfig": { + "CloudWatchMetricsEnabled": true, + "MetricName": "GeoMatchRuleRegionalWaf", + "SampledRequestsEnabled": true, + }, + }, + ], + "Scope": "REGIONAL", + "VisibilityConfig": { + "CloudWatchMetricsEnabled": true, + "MetricName": "WebAcl-GenerativeAiUseCasesStackRegionalWaf2D5714A0", + "SampledRequestsEnabled": true, + }, + }, + "Type": "AWS::WAFv2::WebACL", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechAuthorizerF61277A4": { + "DeletionPolicy": "Delete", + "Properties": { + "IdentitySource": "method.request.header.Authorization", + "Name": "GenerativeAiUseCasesStackSpeechToSpeechAuthorizerC597101F", + "ProviderARNs": [ + { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + ], + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + "Type": "COGNITO_USER_POOLS", + }, + "Type": "AWS::ApiGateway::Authorizer", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechChannelNameCA32A058": { + "DeletionPolicy": "Delete", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "SpeechToSpeechEventApi1E2E9AB4", + "ApiId", + ], + }, + "HandlerConfigs": {}, + "Name": "speech-to-speech", + }, + "Type": "AWS::AppSync::ChannelNamespace", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechEventApi1E2E9AB4": { + "DeletionPolicy": "Delete", + "Properties": { + "EventConfig": { + "AuthProviders": [ + { + "AuthType": "AWS_IAM", + }, + { + "AuthType": "AMAZON_COGNITO_USER_POOLS", + "CognitoConfig": { + "AwsRegion": "us-east-1", + "UserPoolId": { + "Ref": "AuthUserPool8115E87F", + }, + }, + }, + ], + "ConnectionAuthModes": [ + { + "AuthType": "AWS_IAM", + }, + { + "AuthType": "AMAZON_COGNITO_USER_POOLS", + }, + ], + "DefaultPublishAuthModes": [ + { + "AuthType": "AWS_IAM", + }, + { + "AuthType": "AMAZON_COGNITO_USER_POOLS", + }, + ], + "DefaultSubscribeAuthModes": [ + { + "AuthType": "AWS_IAM", + }, + { + "AuthType": "AMAZON_COGNITO_USER_POOLS", + }, + ], + }, + "Name": "SpeechToSpeech", + }, + "Type": "AWS::AppSync::Api", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechStartSession80A7495E": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "SpeechToSpeechStartSessionServiceRoleDefaultPolicy4D6D3AC7", + "SpeechToSpeechStartSessionServiceRoleEBE56984", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "SPEECH_TO_SPEECH_MODEL_IDS": "[{"modelId":"amazon.nova-sonic-v1:0","region":"us-east-1"}]", + "SPEECH_TO_SPEECH_TASK_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SpeechToSpeechTaskC1149BF3", + "Arn", + ], + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "SpeechToSpeechStartSessionServiceRoleEBE56984", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechStartSessionServiceRoleDefaultPolicy4D6D3AC7": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SpeechToSpeechTaskC1149BF3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SpeechToSpeechTaskC1149BF3", + "Arn", + ], + }, + ":*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "SpeechToSpeechStartSessionServiceRoleDefaultPolicy4D6D3AC7", + "Roles": [ + { + "Ref": "SpeechToSpeechStartSessionServiceRoleEBE56984", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechStartSessionServiceRoleEBE56984": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechTaskC1149BF3": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "SpeechToSpeechTaskServiceRoleDefaultPolicy1048205C", + "SpeechToSpeechTaskServiceRole6B9DD524", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "CROSS_ACCOUNT_BEDROCK_ROLE_ARN": "", + "EVENT_API_ENDPOINT": { + "Fn::Join": [ + "", + [ + "https://", + { + "Fn::GetAtt": [ + "SpeechToSpeechEventApi1E2E9AB4", + "Dns.Http", + ], + }, + "/event", + ], + ], + }, + "NAMESPACE": "speech-to-speech", + "SPEECH_TO_SPEECH_MODEL_IDS": "[{"modelId":"amazon.nova-sonic-v1:0","region":"us-east-1"}]", + }, + }, + "Handler": "index.handler", + "MemorySize": 512, + "Role": { + "Fn::GetAtt": [ + "SpeechToSpeechTaskServiceRole6B9DD524", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechTaskServiceRole6B9DD524": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "SpeechToSpeechTaskServiceRoleDefaultPolicy1048205C": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "appsync:EventConnect", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":appsync:us-east-1:123456890123:apis/", + { + "Fn::GetAtt": [ + "SpeechToSpeechEventApi1E2E9AB4", + "ApiId", + ], + }, + ], + ], + }, + }, + { + "Action": [ + "appsync:EventPublish", + "appsync:EventSubscribe", + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":appsync:us-east-1:123456890123:apis/", + { + "Fn::GetAtt": [ + "SpeechToSpeechEventApi1E2E9AB4", + "ApiId", + ], + }, + "/channelNamespace/speech-to-speech", + ], + ], + }, + }, + { + "Action": "bedrock:*", + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "SpeechToSpeechTaskServiceRoleDefaultPolicy1048205C", + "Roles": [ + { + "Ref": "SpeechToSpeechTaskServiceRole6B9DD524", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeAudioBucket39DFF290": { + "DeletionPolicy": "Delete", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*", + ], + "AllowedMethods": [ + "PUT", + ], + "AllowedOrigins": [ + "*", + ], + "ExposedHeaders": [], + "MaxAge": 3000, + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeAudioBucketAutoDeleteObjectsCustomResourceD2EB7175": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "TranscribeAudioBucketPolicyB71E621B", + ], + "Properties": { + "BucketName": { + "Ref": "TranscribeAudioBucket39DFF290", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeAudioBucketPolicyB71E621B": { + "DeletionPolicy": "Delete", + "Properties": { + "Bucket": { + "Ref": "TranscribeAudioBucket39DFF290", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TranscribeAudioBucket39DFF290", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TranscribeAudioBucket39DFF290", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TranscribeAudioBucket39DFF290", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TranscribeAudioBucket39DFF290", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeAuthorizerAD1EA74B": { + "DeletionPolicy": "Delete", + "Properties": { + "IdentitySource": "method.request.header.Authorization", + "Name": "GenerativeAiUseCasesStackTranscribeAuthorizerAF169A6F", + "ProviderARNs": [ + { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + ], + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + "Type": "COGNITO_USER_POOLS", + }, + "Type": "AWS::ApiGateway::Authorizer", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeGetSignedUrlB23CCF77": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "TranscribeGetSignedUrlServiceRoleDefaultPolicyD897275F", + "TranscribeGetSignedUrlServiceRoleA1966EF9", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "BUCKET_NAME": { + "Ref": "TranscribeAudioBucket39DFF290", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "TranscribeGetSignedUrlServiceRoleA1966EF9", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeGetSignedUrlServiceRoleA1966EF9": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeGetSignedUrlServiceRoleDefaultPolicyD897275F": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "TranscribeAudioBucket39DFF290", + }, + ], + ], + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "TranscribeAudioBucket39DFF290", + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "TranscribeGetSignedUrlServiceRoleDefaultPolicyD897275F", + "Roles": [ + { + "Ref": "TranscribeGetSignedUrlServiceRoleA1966EF9", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeGetTranscription3C736BFC": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "TranscribeGetTranscriptionServiceRoleDefaultPolicy319B7E4B", + "TranscribeGetTranscriptionServiceRoleF0840D49", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "TranscribeGetTranscriptionServiceRoleF0840D49", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeGetTranscriptionServiceRoleDefaultPolicy319B7E4B": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "transcribe:*", + "Effect": "Allow", + "Resource": "*", + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "TranscribeTranscriptBucketE67CAF92", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TranscribeTranscriptBucketE67CAF92", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "TranscribeGetTranscriptionServiceRoleDefaultPolicy319B7E4B", + "Roles": [ + { + "Ref": "TranscribeGetTranscriptionServiceRoleF0840D49", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeGetTranscriptionServiceRoleF0840D49": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeGrantAccessTranscribeStream9E9439CC": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "transcribe:StartStreamTranscriptionWebSocket", + "Effect": "Allow", + "Resource": "*", + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "TranscribeGrantAccessTranscribeStream9E9439CC", + "Roles": [ + { + "Ref": "AuthIdentityPoolAuthenticatedRole09311B20", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeStartTranscription7C6A7A96": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "TranscribeStartTranscriptionServiceRoleDefaultPolicyE7AED37C", + "TranscribeStartTranscriptionServiceRoleE21CF5C0", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "TRANSCRIPT_BUCKET_NAME": { + "Ref": "TranscribeTranscriptBucketE67CAF92", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "TranscribeStartTranscriptionServiceRoleE21CF5C0", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeStartTranscriptionServiceRoleDefaultPolicyE7AED37C": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "transcribe:*", + "Effect": "Allow", + "Resource": "*", + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "TranscribeAudioBucket39DFF290", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TranscribeAudioBucket39DFF290", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "TranscribeTranscriptBucketE67CAF92", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TranscribeTranscriptBucketE67CAF92", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "TranscribeStartTranscriptionServiceRoleDefaultPolicyE7AED37C", + "Roles": [ + { + "Ref": "TranscribeStartTranscriptionServiceRoleE21CF5C0", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeStartTranscriptionServiceRoleE21CF5C0": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeTranscriptBucketAutoDeleteObjectsCustomResourceE45B855F": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "TranscribeTranscriptBucketPolicy80F67AB4", + ], + "Properties": { + "BucketName": { + "Ref": "TranscribeTranscriptBucketE67CAF92", + }, + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn", + ], + }, + }, + "Type": "Custom::S3AutoDeleteObjects", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeTranscriptBucketE67CAF92": { + "DeletionPolicy": "Delete", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256", + }, + }, + ], + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true, + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true", + }, + ], + }, + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + }, + "TranscribeTranscriptBucketPolicy80F67AB4": { + "DeletionPolicy": "Delete", + "Properties": { + "Bucket": { + "Ref": "TranscribeTranscriptBucketE67CAF92", + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false", + }, + }, + "Effect": "Deny", + "Principal": { + "AWS": "*", + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TranscribeTranscriptBucketE67CAF92", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TranscribeTranscriptBucketE67CAF92", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn", + ], + }, + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TranscribeTranscriptBucketE67CAF92", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TranscribeTranscriptBucketE67CAF92", + "Arn", + ], + }, + "/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + }, + "Type": "AWS::S3::BucketPolicy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderAuthorizer8C07733E": { + "DeletionPolicy": "Delete", + "Properties": { + "IdentitySource": "method.request.header.Authorization", + "Name": "GenerativeAiUseCasesStackUseCaseBuilderAuthorizer9AB4C426", + "ProviderARNs": [ + { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + ], + "RestApiId": { + "Ref": "APIApiFFA96F67", + }, + "Type": "COGNITO_USER_POOLS", + }, + "Type": "AWS::ApiGateway::Authorizer", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderCreateUseCase63174982": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderCreateUseCaseServiceRoleDefaultPolicyC8ABD900", + "UseCaseBuilderCreateUseCaseServiceRoleA3FFCC29", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderCreateUseCaseServiceRoleA3FFCC29", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderCreateUseCaseServiceRoleA3FFCC29": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderCreateUseCaseServiceRoleDefaultPolicyC8ABD900": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderCreateUseCaseServiceRoleDefaultPolicyC8ABD900", + "Roles": [ + { + "Ref": "UseCaseBuilderCreateUseCaseServiceRoleA3FFCC29", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderDeleteUseCaseA7529A4C": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderDeleteUseCaseServiceRoleDefaultPolicy40E63535", + "UseCaseBuilderDeleteUseCaseServiceRoleCC0155F5", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderDeleteUseCaseServiceRoleCC0155F5", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderDeleteUseCaseServiceRoleCC0155F5": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderDeleteUseCaseServiceRoleDefaultPolicy40E63535": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderDeleteUseCaseServiceRoleDefaultPolicy40E63535", + "Roles": [ + { + "Ref": "UseCaseBuilderDeleteUseCaseServiceRoleCC0155F5", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderGetUseCaseAB744D97": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderGetUseCaseServiceRoleDefaultPolicyB8CCBF75", + "UseCaseBuilderGetUseCaseServiceRoleF32AAC5F", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "MemorySize": 512, + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderGetUseCaseServiceRoleF32AAC5F", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderGetUseCaseServiceRoleDefaultPolicyB8CCBF75": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderGetUseCaseServiceRoleDefaultPolicyB8CCBF75", + "Roles": [ + { + "Ref": "UseCaseBuilderGetUseCaseServiceRoleF32AAC5F", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderGetUseCaseServiceRoleF32AAC5F": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListFavoriteUseCasesC4AF9A45": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderListFavoriteUseCasesServiceRoleDefaultPolicy51BC1ECC", + "UseCaseBuilderListFavoriteUseCasesServiceRole5BCFD9A7", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "MemorySize": 512, + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderListFavoriteUseCasesServiceRole5BCFD9A7", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListFavoriteUseCasesServiceRole5BCFD9A7": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListFavoriteUseCasesServiceRoleDefaultPolicy51BC1ECC": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderListFavoriteUseCasesServiceRoleDefaultPolicy51BC1ECC", + "Roles": [ + { + "Ref": "UseCaseBuilderListFavoriteUseCasesServiceRole5BCFD9A7", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListRecentlyUsedUseCases8560B5B5": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderListRecentlyUsedUseCasesServiceRoleDefaultPolicy957AE976", + "UseCaseBuilderListRecentlyUsedUseCasesServiceRole977F8D35", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "MemorySize": 512, + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderListRecentlyUsedUseCasesServiceRole977F8D35", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListRecentlyUsedUseCasesServiceRole977F8D35": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListRecentlyUsedUseCasesServiceRoleDefaultPolicy957AE976": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderListRecentlyUsedUseCasesServiceRoleDefaultPolicy957AE976", + "Roles": [ + { + "Ref": "UseCaseBuilderListRecentlyUsedUseCasesServiceRole977F8D35", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListUseCases151E3C64": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderListUseCasesServiceRoleDefaultPolicy43BE80BA", + "UseCaseBuilderListUseCasesServiceRoleDE660444", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "MemorySize": 512, + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderListUseCasesServiceRoleDE660444", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListUseCasesServiceRoleDE660444": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderListUseCasesServiceRoleDefaultPolicy43BE80BA": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderListUseCasesServiceRoleDefaultPolicy43BE80BA", + "Roles": [ + { + "Ref": "UseCaseBuilderListUseCasesServiceRoleDE660444", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderToggleFavoriteA16A6638": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderToggleFavoriteServiceRoleDefaultPolicyE7EBFEAE", + "UseCaseBuilderToggleFavoriteServiceRoleB35C95DC", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderToggleFavoriteServiceRoleB35C95DC", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderToggleFavoriteServiceRoleB35C95DC": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderToggleFavoriteServiceRoleDefaultPolicyE7EBFEAE": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderToggleFavoriteServiceRoleDefaultPolicyE7EBFEAE", + "Roles": [ + { + "Ref": "UseCaseBuilderToggleFavoriteServiceRoleB35C95DC", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderToggleSharedB07A30CD": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderToggleSharedServiceRoleDefaultPolicyC3050E12", + "UseCaseBuilderToggleSharedServiceRole38B2DFFA", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderToggleSharedServiceRole38B2DFFA", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderToggleSharedServiceRole38B2DFFA": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderToggleSharedServiceRoleDefaultPolicyC3050E12": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderToggleSharedServiceRoleDefaultPolicyC3050E12", + "Roles": [ + { + "Ref": "UseCaseBuilderToggleSharedServiceRole38B2DFFA", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderUpdateRecentlyUsedUseCase67823255": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderUpdateRecentlyUsedUseCaseServiceRoleDefaultPolicy3710A5C8", + "UseCaseBuilderUpdateRecentlyUsedUseCaseServiceRoleB21E07B0", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderUpdateRecentlyUsedUseCaseServiceRoleB21E07B0", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderUpdateRecentlyUsedUseCaseServiceRoleB21E07B0": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderUpdateRecentlyUsedUseCaseServiceRoleDefaultPolicy3710A5C8": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderUpdateRecentlyUsedUseCaseServiceRoleDefaultPolicy3710A5C8", + "Roles": [ + { + "Ref": "UseCaseBuilderUpdateRecentlyUsedUseCaseServiceRoleB21E07B0", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderUpdateUseCaseFF8D7827": { + "DeletionPolicy": "Delete", + "DependsOn": [ + "UseCaseBuilderUpdateUseCaseServiceRoleDefaultPolicy3934DEC9", + "UseCaseBuilderUpdateUseCaseServiceRole754D86C5", + ], + "Properties": { + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456890123-us-east-1", + "S3Key": "HASH-REPLACED.zip", + }, + "Environment": { + "Variables": { + "USECASE_ID_INDEX_NAME": "UseCaseIdIndexName", + "USECASE_TABLE_NAME": { + "Ref": "UseCaseBuilderUseCaseBuilderTable449740F3", + }, + }, + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "UseCaseBuilderUpdateUseCaseServiceRole754D86C5", + "Arn", + ], + }, + "Runtime": "nodejs22.x", + "Timeout": 900, + }, + "Type": "AWS::Lambda::Function", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderUpdateUseCaseServiceRole754D86C5": { + "DeletionPolicy": "Delete", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com", + }, + }, + ], + "Version": "2012-10-17", + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition", + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + ], + ], + }, + ], + }, + "Type": "AWS::IAM::Role", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderUpdateUseCaseServiceRoleDefaultPolicy3934DEC9": { + "DeletionPolicy": "Delete", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "UseCaseBuilderUseCaseBuilderTable449740F3", + "Arn", + ], + }, + "/index/*", + ], + ], + }, + ], + }, + ], + "Version": "2012-10-17", + }, + "PolicyName": "UseCaseBuilderUpdateUseCaseServiceRoleDefaultPolicy3934DEC9", + "Roles": [ + { + "Ref": "UseCaseBuilderUpdateUseCaseServiceRole754D86C5", + }, + ], + }, + "Type": "AWS::IAM::Policy", + "UpdateReplacePolicy": "Delete", + }, + "UseCaseBuilderUseCaseBuilderTable449740F3": { + "DeletionPolicy": "Delete", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S", + }, + { + "AttributeName": "dataType", + "AttributeType": "S", + }, + { + "AttributeName": "useCaseId", + "AttributeType": "S", + }, + ], + "BillingMode": "PAY_PER_REQUEST", + "GlobalSecondaryIndexes": [ + { + "IndexName": "UseCaseIdIndexName", + "KeySchema": [ + { + "AttributeName": "useCaseId", + "KeyType": "HASH", + }, + { + "AttributeName": "dataType", + "KeyType": "RANGE", + }, + ], + "Projection": { + "ProjectionType": "ALL", + }, + }, + ], + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH", + }, + { + "AttributeName": "dataType", + "KeyType": "RANGE", + }, + ], + }, + "Type": "AWS::DynamoDB::Table", + "UpdateReplacePolicy": "Delete", + }, + "UserPoolWafAssociation": { + "DeletionPolicy": "Delete", + "Properties": { + "ResourceArn": { + "Fn::GetAtt": [ + "AuthUserPool8115E87F", + "Arn", + ], + }, + "WebACLArn": { + "Fn::GetAtt": [ + "RegionalWafWebAclRegionalWaf7F1BE9A6", + "Arn", + ], + }, + }, + "Type": "AWS::WAFv2::WebACLAssociation", + "UpdateReplacePolicy": "Delete", + }, + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5", + ], + { + "Ref": "BootstrapVersion", + }, + ], + }, + ], + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.", + }, + ], + }, + }, +} +`; + +exports[`GenerativeAiUseCases matches the snapshot (mfa enabled) 7`] = ` +{ + "Outputs": { + "BedrockLogGroup": { + "Value": { + "Ref": "LogGroupF5B46931", + }, + }, + "DashboardName": { + "Value": { + "Ref": "Dashboard9E4231ED", + }, + }, + "DashboardUrl": { + "Value": { + "Fn::Join": [ + "", + [ + "https://console.aws.amazon.com/cloudwatch/home#dashboards/dashboard/", + { + "Ref": "Dashboard9E4231ED", + }, + ], + ], + }, + }, + }, + "Parameters": { + "BootstrapVersion": { + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", + "Type": "AWS::SSM::Parameter::Value", + }, + }, + "Resources": { + "Dashboard9E4231ED": { + "Properties": { + "DashboardBody": { + "Fn::Join": [ + "", + [ + "{"start":"-P7D","widgets":[{"type":"text","width":18,"height":1,"x":0,"y":0,"properties":{"markdown":"**Amazon Bedrock Metrics**"}},{"type":"text","width":6,"height":1,"x":18,"y":0,"properties":{"markdown":"**User Metrics**"}},{"type":"metric","width":6,"height":6,"x":0,"y":1,"properties":{"view":"timeSeries","title":"InputTokenCount (Daily)","region":"", + { + "Ref": "AWS::Region", + }, + "","metrics":[["AWS/Bedrock","InputTokenCount","ModelId","anthropic.claude-3-sonnet-20240229-v1:0",{"region":"us-east-1","period":86400,"stat":"Sum"}]],"yAxis":{}}},{"type":"metric","width":6,"height":6,"x":6,"y":1,"properties":{"view":"timeSeries","title":"OutputTokenCount (Daily)","region":"", + { + "Ref": "AWS::Region", + }, + "","metrics":[["AWS/Bedrock","OutputTokenCount","ModelId","anthropic.claude-3-sonnet-20240229-v1:0",{"region":"us-east-1","period":86400,"stat":"Sum"}]],"yAxis":{}}},{"type":"metric","width":6,"height":6,"x":12,"y":1,"properties":{"view":"timeSeries","title":"Invocations (Daily)","region":"", + { + "Ref": "AWS::Region", + }, + "","metrics":[["AWS/Bedrock","Invocations","ModelId","anthropic.claude-3-sonnet-20240229-v1:0",{"region":"us-east-1","period":86400,"stat":"Sum"}],["AWS/Bedrock","Invocations","ModelId","stability.stable-diffusion-xl-v1",{"region":"us-east-1","period":86400,"stat":"Sum"}]],"yAxis":{}}},{"type":"metric","width":6,"height":6,"x":18,"y":1,"properties":{"view":"timeSeries","title":"UserPool","region":"", + { + "Ref": "AWS::Region", + }, + "","metrics":[["AWS/Cognito","SignInSuccesses","UserPool","", + { + "Fn::ImportValue": "GenerativeAiUseCasesStack:ExportsOutputRefAuthUserPool8115E87F4F9C6D4C", + }, + "","UserPoolClient","", + { + "Fn::ImportValue": "GenerativeAiUseCasesStack:ExportsOutputRefAuthUserPoolclientA74673A913CB5D33", + }, + "",{"region":"us-east-1","period":3600,"stat":"Sum"}],["AWS/Cognito","TokenRefreshSuccesses","UserPool","", + { + "Fn::ImportValue": "GenerativeAiUseCasesStack:ExportsOutputRefAuthUserPool8115E87F4F9C6D4C", + }, + "","UserPoolClient","", + { + "Fn::ImportValue": "GenerativeAiUseCasesStack:ExportsOutputRefAuthUserPoolclientA74673A913CB5D33", + }, + "",{"region":"us-east-1","period":3600,"stat":"Sum"}],["AWS/Cognito","SignUpSuccesses","UserPool","", + { + "Fn::ImportValue": "GenerativeAiUseCasesStack:ExportsOutputRefAuthUserPool8115E87F4F9C6D4C", + }, + "","UserPoolClient","", + { + "Fn::ImportValue": "GenerativeAiUseCasesStack:ExportsOutputRefAuthUserPoolclientA74673A913CB5D33", + }, + "",{"region":"us-east-1","period":3600,"stat":"Sum"}]],"yAxis":{}}},{"type":"text","width":24,"height":1,"x":0,"y":7,"properties":{"markdown":"**Prompt Logs**"}},{"type":"log","width":24,"height":6,"x":0,"y":8,"properties":{"view":"table","title":"Prompt Logs","region":"", + { + "Ref": "AWS::Region", + }, + "","query":"SOURCE '", + { + "Ref": "LogGroupF5B46931", + }, + "' | filter @logStream = 'aws/bedrock/modelinvocations'\\n| filter schemaType like 'ModelInvocationLog'\\n| filter concat(input.inputBodyJson.prompt, input.inputBodyJson.messages.0.content.0.text) not like /.*.*/\\n| sort @timestamp desc\\n| fields @timestamp, concat(input.inputBodyJson.prompt, input.inputBodyJson.messages.0.content.0.text) as input, modelId"}}]}", + ], + ], + }, + }, + "Type": "AWS::CloudWatch::Dashboard", + }, + "LogGroupF5B46931": { + "DeletionPolicy": "Retain", + "Properties": { + "RetentionInDays": 365, + }, + "Type": "AWS::Logs::LogGroup", + "UpdateReplacePolicy": "Retain", + }, + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5", + ], + { + "Ref": "BootstrapVersion", + }, + ], + }, + ], + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.", + }, + ], + }, + }, +} +`; + exports[`GenerativeAiUseCases matches the snapshot 1`] = ` { "Outputs": { @@ -39950,6 +61221,7 @@ exports[`GenerativeAiUseCases matches the snapshot 6`] = ` "VITE_APP_MCP_ENABLED": "false", "VITE_APP_MCP_ENDPOINT": "", "VITE_APP_MCP_SERVERS_CONFIG": "{"time":{"metadata":{"category":"Utility","description":"Provides current time and date functionality"}},"aws-knowledge-mcp-server":{"metadata":{"category":"AWS","description":"AWS Knowledge Base MCP server for enterprise knowledge access"}},"awslabs.aws-documentation-mcp-server":{"metadata":{"category":"AWS","description":"Access AWS documentation and guides"}},"awslabs.cdk-mcp-server":{"metadata":{"category":"AWS","description":"AWS CDK code generation and assistance"}},"awslabs.aws-diagram-mcp-server":{"metadata":{"category":"AWS","description":"Generate AWS architecture diagrams"}},"awslabs.nova-canvas-mcp-server":{"metadata":{"category":"AI/ML","description":"Amazon Nova Canvas image generation"}},"tavily-search":{"metadata":{"category":"Search","description":"Web search and research capabilities powered by Tavily"}},"tavily-gateway":{"metadata":{"category":"Search","description":"Web search and research capabilities powered by Tavily"}}}", + "VITE_APP_MFA_ENABLED": "false", "VITE_APP_MODEL_IDS": "[{"modelId":"anthropic.claude-3-sonnet-20240229-v1:0","region":"us-east-1"}]", "VITE_APP_MODEL_REGION": "us-east-1", "VITE_APP_OPTIMIZE_PROMPT_FUNCTION_ARN": { @@ -41571,6 +62843,7 @@ exports[`GenerativeAiUseCases matches the snapshot 6`] = ` ], "EmailVerificationMessage": "The verification code to your new account is {####}", "EmailVerificationSubject": "Verify your new account", + "MfaConfiguration": "OFF", "Policies": { "PasswordPolicy": { "MinimumLength": 8, diff --git a/packages/cdk/test/generative-ai-use-cases.test.ts b/packages/cdk/test/generative-ai-use-cases.test.ts index f5a1ecec0..40004843c 100644 --- a/packages/cdk/test/generative-ai-use-cases.test.ts +++ b/packages/cdk/test/generative-ai-use-cases.test.ts @@ -34,6 +34,8 @@ describe('GenerativeAiUseCases', () => { samlAuthEnabled: false, samlCognitoDomainName: '', samlCognitoFederatedIdentityProviderName: '', + mfaEnabled: false, + mfaReplyToEmail: null, modelRegion: 'us-east-1', modelIds: [ { @@ -177,6 +179,41 @@ describe('GenerativeAiUseCases', () => { expect(dashboardTemplate.toJSON()).toMatchSnapshot(); }); + test('matches the snapshot (mfa enabled)', () => { + const app = new cdk.App({ + context: appContext, + }); + + const params = processedStackInputSchema.parse({ + ...stackInput, + mfaEnabled: true, + mfaFromEmail: 'no-reply@example.com', + }); + + const { cloudFrontWafStack, ragKnowledgeBaseStack, agentStack, agentCoreStack, guardrailStack, generativeAiUseCasesStack, dashboardStack } = + createStacks(app, params); + + if ( + !cloudFrontWafStack || + !ragKnowledgeBaseStack || + !agentStack || + !agentCoreStack || + !guardrailStack || + !generativeAiUseCasesStack || + !dashboardStack + ) { + throw new Error('Not all stacks are created'); + } + + expect(Template.fromStack(cloudFrontWafStack).toJSON()).toMatchSnapshot(); + expect(Template.fromStack(ragKnowledgeBaseStack).toJSON()).toMatchSnapshot(); + expect(Template.fromStack(agentStack).toJSON()).toMatchSnapshot(); + expect(Template.fromStack(agentCoreStack).toJSON()).toMatchSnapshot(); + expect(Template.fromStack(guardrailStack).toJSON()).toMatchSnapshot(); + expect(Template.fromStack(generativeAiUseCasesStack).toJSON()).toMatchSnapshot(); + expect(Template.fromStack(dashboardStack).toJSON()).toMatchSnapshot(); + }); + test('tagKey functionality', () => { // Test with custom tagKey const appWithCustomTag = new cdk.App({ diff --git a/packages/web/src/components/AuthWithUserpool.tsx b/packages/web/src/components/AuthWithUserpool.tsx index d3c6be969..aa3b846bd 100644 --- a/packages/web/src/components/AuthWithUserpool.tsx +++ b/packages/web/src/components/AuthWithUserpool.tsx @@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next'; const selfSignUpEnabled: boolean = import.meta.env.VITE_APP_SELF_SIGN_UP_ENABLED === 'true'; +const mfaEnabled: boolean = import.meta.env.VITE_APP_MFA_ENABLED === 'true'; const speechToSpeechEventApiEndpoint: string = import.meta.env .VITE_APP_SPEECH_TO_SPEECH_EVENT_API_ENDPOINT; const cognitoUserPoolProxyEndpoint = import.meta.env @@ -48,6 +49,7 @@ const AuthWithUserpool: React.FC = (props) => { return ( ( @@ -55,6 +57,12 @@ const AuthWithUserpool: React.FC = (props) => { {t('auth.title')} ), + // Hide Forgot Password link when MFA is enabled (Email cannot be used for password reset when email MFA is in use) + ...(mfaEnabled && { + SignIn: { + Footer: () => null, + }, + }), }}> {props.children}