// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Snapshot test 1`] = ` Object { "Outputs": Object { "Region": Object { "Value": Object { "Ref": "AWS::Region", }, }, "UserPoolId": Object { "Value": Object { "Ref": "AuthUserPool8115E87F", }, }, "UserPoolWebClientId": Object { "Value": Object { "Ref": "AuthUserPoolClientC635291F", }, }, "WebSocketEndpoint": Object { "Value": Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "WebsocketApiD2C932E4", "ApiEndpoint", ], }, "/prod", ], ], }, }, }, "Parameters": Object { "BootstrapVersion": Object { "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": Object { "AuthUserPool8115E87F": Object { "DeletionPolicy": "Delete", "Properties": Object { "AccountRecoverySetting": Object { "RecoveryMechanisms": Array [ Object { "Name": "verified_phone_number", "Priority": 1, }, Object { "Name": "verified_email", "Priority": 2, }, ], }, "AdminCreateUserConfig": Object { "AllowAdminCreateUserOnly": false, }, "AutoVerifiedAttributes": Array [ "email", ], "EmailVerificationMessage": "The verification code to your new account is {####}", "EmailVerificationSubject": "Verify your new account", "SmsVerificationMessage": "The verification code to your new account is {####}", "VerificationMessageTemplate": Object { "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", }, "AuthUserPoolClientC635291F": Object { "Properties": Object { "AllowedOAuthFlows": Array [ "implicit", "code", ], "AllowedOAuthFlowsUserPoolClient": true, "AllowedOAuthScopes": Array [ "profile", "phone", "email", "openid", "aws.cognito.signin.user.admin", ], "CallbackURLs": Array [ "https://example.com", ], "ExplicitAuthFlows": Array [ "ALLOW_USER_PASSWORD_AUTH", "ALLOW_USER_SRP_AUTH", "ALLOW_REFRESH_TOKEN_AUTH", ], "SupportedIdentityProviders": Array [ "COGNITO", ], "UserPoolId": Object { "Ref": "AuthUserPool8115E87F", }, }, "Type": "AWS::Cognito::UserPoolClient", }, "HandlerAuthHandlerEB1BC6C8": Object { "DependsOn": Array [ "HandlerAuthHandlerServiceRoleC7D9E369", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "4859a285d26dd41c833b1b71aa784ece8d41e32919b8aae9cc3aa4cedc9bfac7.zip", }, "Environment": Object { "Variables": Object { "APP_CLIENT_ID": Object { "Ref": "AuthUserPoolClientC635291F", }, "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "USER_POOL_ID": Object { "Ref": "AuthUserPool8115E87F", }, }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "HandlerAuthHandlerServiceRoleC7D9E369", "Arn", ], }, "Runtime": "nodejs18.x", }, "Type": "AWS::Lambda::Function", }, "HandlerAuthHandlerServiceRoleC7D9E369": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", ], ], }, ], }, "Type": "AWS::IAM::Role", }, "HandlerWebSocketHandlerAD178334": Object { "DependsOn": Array [ "HandlerWebSocketHandlerServiceRoleDefaultPolicy29CB2487", "HandlerWebSocketHandlerServiceRole834C0C01", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "e9edfc77414736ad31d2cc95dfc5a9f17de77c9b744b2b464c377c6b652e0c4b.zip", }, "Environment": Object { "Variables": Object { "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "CONNECTION_TABLE_NAME": Object { "Ref": "StorageConnectionIdTable8B3A349D", }, }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "HandlerWebSocketHandlerServiceRole834C0C01", "Arn", ], }, "Runtime": "nodejs18.x", }, "Type": "AWS::Lambda::Function", }, "HandlerWebSocketHandlerServiceRole834C0C01": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", ], ], }, ], }, "Type": "AWS::IAM::Role", }, "HandlerWebSocketHandlerServiceRoleDefaultPolicy29CB2487": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "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": Array [ Object { "Fn::GetAtt": Array [ "StorageConnectionIdTable8B3A349D", "Arn", ], }, Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "StorageConnectionIdTable8B3A349D", "Arn", ], }, "/index/*", ], ], }, ], }, Object { "Action": "execute-api:ManageConnections", "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":execute-api:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":", Object { "Ref": "WebsocketApiD2C932E4", }, "/*/POST/@connections/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "HandlerWebSocketHandlerServiceRoleDefaultPolicy29CB2487", "Roles": Array [ Object { "Ref": "HandlerWebSocketHandlerServiceRole834C0C01", }, ], }, "Type": "AWS::IAM::Policy", }, "StorageConnectionIdTable8B3A349D": Object { "DeletionPolicy": "Delete", "Properties": Object { "AttributeDefinitions": Array [ Object { "AttributeName": "connectionId", "AttributeType": "S", }, Object { "AttributeName": "userId", "AttributeType": "S", }, ], "BillingMode": "PAY_PER_REQUEST", "GlobalSecondaryIndexes": Array [ Object { "IndexName": "userIdIndex", "KeySchema": Array [ Object { "AttributeName": "userId", "KeyType": "HASH", }, ], "Projection": Object { "ProjectionType": "ALL", }, }, ], "KeySchema": Array [ Object { "AttributeName": "connectionId", "KeyType": "HASH", }, ], "TimeToLiveSpecification": Object { "AttributeName": "removedAt", "Enabled": true, }, }, "Type": "AWS::DynamoDB::Table", "UpdateReplacePolicy": "Delete", }, "WebsocketApiAuthorizer8462BD7C": Object { "Properties": Object { "ApiId": Object { "Ref": "WebsocketApiD2C932E4", }, "AuthorizerType": "REQUEST", "AuthorizerUri": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":apigateway:", Object { "Ref": "AWS::Region", }, ":lambda:path/2015-03-31/functions/", Object { "Fn::GetAtt": Array [ "HandlerAuthHandlerEB1BC6C8", "Arn", ], }, "/invocations", ], ], }, "IdentitySource": Array [ "route.request.querystring.idToken", ], "Name": "Authorizer", }, "Type": "AWS::ApiGatewayV2::Authorizer", }, "WebsocketApiBackendStackWebsocketApiAuthorizerB3A276A3PermissionB6709820": Object { "Properties": Object { "Action": "lambda:InvokeFunction", "FunctionName": Object { "Fn::GetAtt": Array [ "HandlerAuthHandlerEB1BC6C8", "Arn", ], }, "Principal": "apigateway.amazonaws.com", "SourceArn": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":execute-api:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":", Object { "Ref": "WebsocketApiD2C932E4", }, "/authorizers/", Object { "Ref": "WebsocketApiAuthorizer8462BD7C", }, ], ], }, }, "Type": "AWS::Lambda::Permission", }, "WebsocketApiD2C932E4": Object { "Properties": Object { "Name": "Api", "ProtocolType": "WEBSOCKET", "RouteSelectionExpression": "$request.body.action", }, "Type": "AWS::ApiGatewayV2::Api", }, "WebsocketApiconnectRouteConnectIntegration5ACB3823": Object { "Properties": Object { "ApiId": Object { "Ref": "WebsocketApiD2C932E4", }, "IntegrationType": "AWS_PROXY", "IntegrationUri": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":apigateway:", Object { "Ref": "AWS::Region", }, ":lambda:path/2015-03-31/functions/", Object { "Fn::GetAtt": Array [ "HandlerWebSocketHandlerAD178334", "Arn", ], }, "/invocations", ], ], }, }, "Type": "AWS::ApiGatewayV2::Integration", }, "WebsocketApiconnectRouteConnectIntegrationPermissionC03255D5": Object { "Properties": Object { "Action": "lambda:InvokeFunction", "FunctionName": Object { "Fn::GetAtt": Array [ "HandlerWebSocketHandlerAD178334", "Arn", ], }, "Principal": "apigateway.amazonaws.com", "SourceArn": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":execute-api:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":", Object { "Ref": "WebsocketApiD2C932E4", }, "/*/*$connect", ], ], }, }, "Type": "AWS::Lambda::Permission", }, "WebsocketApiconnectRouteFCBDA9B8": Object { "Properties": Object { "ApiId": Object { "Ref": "WebsocketApiD2C932E4", }, "AuthorizationType": "CUSTOM", "AuthorizerId": Object { "Ref": "WebsocketApiAuthorizer8462BD7C", }, "RouteKey": "$connect", "Target": Object { "Fn::Join": Array [ "", Array [ "integrations/", Object { "Ref": "WebsocketApiconnectRouteConnectIntegration5ACB3823", }, ], ], }, }, "Type": "AWS::ApiGatewayV2::Route", }, "WebsocketApidefaultRoute88AB6B56": Object { "Properties": Object { "ApiId": Object { "Ref": "WebsocketApiD2C932E4", }, "AuthorizationType": "NONE", "RouteKey": "$default", "Target": Object { "Fn::Join": Array [ "", Array [ "integrations/", Object { "Ref": "WebsocketApidefaultRouteDefaultIntegration4E7A24BE", }, ], ], }, }, "Type": "AWS::ApiGatewayV2::Route", }, "WebsocketApidefaultRouteDefaultIntegration4E7A24BE": Object { "Properties": Object { "ApiId": Object { "Ref": "WebsocketApiD2C932E4", }, "IntegrationType": "AWS_PROXY", "IntegrationUri": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":apigateway:", Object { "Ref": "AWS::Region", }, ":lambda:path/2015-03-31/functions/", Object { "Fn::GetAtt": Array [ "HandlerWebSocketHandlerAD178334", "Arn", ], }, "/invocations", ], ], }, }, "Type": "AWS::ApiGatewayV2::Integration", }, "WebsocketApidefaultRouteDefaultIntegrationPermission32373F5B": Object { "Properties": Object { "Action": "lambda:InvokeFunction", "FunctionName": Object { "Fn::GetAtt": Array [ "HandlerWebSocketHandlerAD178334", "Arn", ], }, "Principal": "apigateway.amazonaws.com", "SourceArn": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":execute-api:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":", Object { "Ref": "WebsocketApiD2C932E4", }, "/*/*$default", ], ], }, }, "Type": "AWS::Lambda::Permission", }, "WebsocketApidisconnectRoute04ED391F": Object { "Properties": Object { "ApiId": Object { "Ref": "WebsocketApiD2C932E4", }, "AuthorizationType": "NONE", "RouteKey": "$disconnect", "Target": Object { "Fn::Join": Array [ "", Array [ "integrations/", Object { "Ref": "WebsocketApidisconnectRouteDisconnectIntegrationB768D80E", }, ], ], }, }, "Type": "AWS::ApiGatewayV2::Route", }, "WebsocketApidisconnectRouteDisconnectIntegrationB768D80E": Object { "Properties": Object { "ApiId": Object { "Ref": "WebsocketApiD2C932E4", }, "IntegrationType": "AWS_PROXY", "IntegrationUri": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":apigateway:", Object { "Ref": "AWS::Region", }, ":lambda:path/2015-03-31/functions/", Object { "Fn::GetAtt": Array [ "HandlerWebSocketHandlerAD178334", "Arn", ], }, "/invocations", ], ], }, }, "Type": "AWS::ApiGatewayV2::Integration", }, "WebsocketApidisconnectRouteDisconnectIntegrationPermission54ECF5B3": Object { "Properties": Object { "Action": "lambda:InvokeFunction", "FunctionName": Object { "Fn::GetAtt": Array [ "HandlerWebSocketHandlerAD178334", "Arn", ], }, "Principal": "apigateway.amazonaws.com", "SourceArn": Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":execute-api:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":", Object { "Ref": "WebsocketApiD2C932E4", }, "/*/*$disconnect", ], ], }, }, "Type": "AWS::Lambda::Permission", }, "WebsocketStage50369996": Object { "Properties": Object { "ApiId": Object { "Ref": "WebsocketApiD2C932E4", }, "AutoDeploy": true, "StageName": "prod", }, "Type": "AWS::ApiGatewayV2::Stage", }, }, "Rules": Object { "CheckBootstrapVersion": Object { "Assertions": Array [ Object { "Assert": Object { "Fn::Not": Array [ Object { "Fn::Contains": Array [ Array [ "1", "2", "3", "4", "5", ], Object { "Ref": "BootstrapVersion", }, ], }, ], }, "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.", }, ], }, }, } `;