// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Snapshot 1`] = ` Object { "Mappings": Object { "ServerInstanceAmiMap3262B564": Object { "us-east-1": Object { "ami": Object { "Ref": "SsmParameterValueawsservicecanonicalubuntuserverjammystablecurrentarm64hvmebsgp2amiidC96584B6F00A464EAD1953AFF4B05118Parameter", }, }, }, }, "Outputs": Object { "APIURL": Object { "Value": Object { "Fn::Join": Array [ "", Array [ "https://", Object { "Ref": "InfrastructurelexContactCenter93E20989", }, ".execute-api.", Object { "Ref": "AWS::Region", }, ".", Object { "Ref": "AWS::URLSuffix", }, "/", Object { "Ref": "InfrastructurelexContactCenterDeploymentStageprod655257E5", }, "/", ], ], }, }, "AmazonLexBotAliasID": Object { "Value": Object { "Fn::GetAtt": Array [ "LexchimeLexBotAlias275DAEDB", "BotAliasId", ], }, }, "AmazonLexBotID": Object { "Value": Object { "Fn::GetAtt": Array [ "LexchimeLexBot2A96F463", "Id", ], }, }, "InfrastructurelexContactCenterEndpointEB12F7CD": Object { "Value": Object { "Fn::Join": Array [ "", Array [ "https://", Object { "Ref": "InfrastructurelexContactCenter93E20989", }, ".execute-api.", Object { "Ref": "AWS::Region", }, ".", Object { "Ref": "AWS::URLSuffix", }, "/", Object { "Ref": "InfrastructurelexContactCenterDeploymentStageprod655257E5", }, "/", ], ], }, }, "callInfoTable": Object { "Value": Object { "Ref": "DatabasecallerTableBB5C7489", }, }, "callQueryLambda": Object { "Value": Object { "Ref": "InfrastructurecallQueryLambdaF4D2E612", }, }, "logGroups": Object { "Value": "/var/log/amazon-chime-sdk-lex/", }, "password": Object { "Value": Object { "Ref": "ServerInstanceE518391B3f397fb84abf6f47", }, }, "queryAPI": Object { "Value": Object { "Ref": "InfrastructurelexContactCenter93E20989", }, }, "sipuri": Object { "Value": Object { "Fn::Join": Array [ "", Array [ "agent@", Object { "Ref": "VPCserverEip15B58F30", }, ], ], }, }, "ssmCommand": Object { "Value": Object { "Fn::Join": Array [ "", Array [ "aws ssm start-session --target ", Object { "Ref": "ServerInstanceE518391B3f397fb84abf6f47", }, ], ], }, }, "voiceConnectorPhone": Object { "Value": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnCustomResource0292ED71", "phoneNumber", ], }, }, "websocket": Object { "Value": Object { "Fn::Join": Array [ "", Array [ "ws://", Object { "Ref": "VPCserverEip15B58F30", }, ":8088/ws", ], ], }, }, }, "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", }, "SsmParameterValueawsservicecanonicalubuntuserverjammystablecurrentarm64hvmebsgp2amiidC96584B6F00A464EAD1953AFF4B05118Parameter": Object { "Default": "/aws/service/canonical/ubuntu/server/jammy/stable/current/arm64/hvm/ebs-gp2/ami-id", "Type": "AWS::SSM::Parameter::Value", }, }, "Resources": Object { "AWS679f53fac002430cb0da5b7982bd22872D164C4C": Object { "DependsOn": Array [ "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "099a3112386fa620b3069790dcf92c8e64bb5341760a8b0a76bfa843f8ad41df.zip", }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", }, "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": 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", }, "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEvent1B72E6E8": Object { "DependsOn": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicyA32F1A45", "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEventServiceRoleFC6C1D28", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf.zip", }, "Description": "AWS CDK resource provider framework - onEvent (test/AmazonChimeSDKSMA/sipMediaApp/sipMediaAppRequest/PSTNResourceProvider)", "Environment": Object { "Variables": Object { "USER_ON_EVENT_FUNCTION_ARN": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnResourcesFunctionCBC1D849", "Arn", ], }, }, }, "Handler": "framework.onEvent", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEventServiceRoleFC6C1D28", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicyA32F1A45": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "lambda:InvokeFunction", "Effect": "Allow", "Resource": Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnResourcesFunctionCBC1D849", "Arn", ], }, Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnResourcesFunctionCBC1D849", "Arn", ], }, ":*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicyA32F1A45", "Roles": Array [ Object { "Ref": "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEventServiceRoleFC6C1D28", }, ], }, "Type": "AWS::IAM::Policy", }, "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEventServiceRoleFC6C1D28": 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", }, "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnCustomResource275F4D94": Object { "DeletionPolicy": "Delete", "Properties": Object { "ServiceToken": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestPSTNResourceProviderframeworkonEvent1B72E6E8", "Arn", ], }, "properties": Object { "endpoint": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsmaHandlerLambda4FD8110E", "Arn", ], }, "name": "testAmazonChimeSDKSMAsipMediaApp5FB1BB76", "region": Object { "Ref": "AWS::Region", }, }, "resourceType": "SMA", "uid": "testAmazonChimeSDKSMAsipMediaApp5FB1BB76", }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnCustomResourceRoleC2DDF6D8": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Description": "Amazon Chime PSTN Resources", "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", ], ], }, ], "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "chime:*VoiceProfileDomain*", "kms:CreateGrant", "kms:DescribeKey", "chime:*MediaInsightsPipelineConfiguration*", "chime:CreateSipRule", "chime:DeleteSipRule", "chime:UpdateSipRule", "chime:GetSipRule", "chime:CreateSipMediaApplication", "chime:DeleteSipMediaApplication", "chime:GetPhoneNumberOrder", "chime:SearchAvailablePhoneNumbers", "chime:CreatePhoneNumberOrder", "chime:DeletePhoneNumber", "chime:GetPhoneNumber", "chime:CreateVoiceConnector", "chime:PutVoiceConnectorStreamingConfiguration", "chime:PutVoiceConnectorTermination", "chime:PutVoiceConnectorOrigination", "chime:PutVoiceConnectorLoggingConfiguration", "chime:ListPhoneNumbers", "chime:AssociatePhoneNumbersWithVoiceConnector", "chime:DisassociatePhoneNumbersFromVoiceConnector", "chime:DeleteVoiceConnector", "chime:PutSipMediaApplicationAlexaSkillConfiguration", "chime:PutSipMediaApplicationLoggingConfiguration", "logs:GetLogDelivery", "logs:DeleteLogDelivery", "logs:ListLogDeliveries", "logs:CreateLogGroup", "logs:DescribeResourcePolicies", "logs:PutResourcePolicy", "logs:DescribeLogGroups", "logs:CreateLogDelivery", "lambda:GetPolicy", "lambda:AddPermission", "iam:PutRolePolicy", "iam:CreateServiceLinkedRole", ], "Effect": "Allow", "Resource": "*", }, Object { "Action": Array [ "ssm:PutParameter", "ssm:GetParameter", "ssm:DeleteParameter", ], "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:aws:ssm:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":parameter/chime/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "chimePolicy", }, ], }, "Type": "AWS::IAM::Role", }, "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnResourcesFunctionCBC1D849": Object { "DependsOn": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnCustomResourceRoleC2DDF6D8", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "17adca7ffd51a469d35bc3b81f5a0add6f87532707cf8ab5b2b4569f57d29d2a.zip", }, "Description": "src/resources/pstn/pstn.lambda.ts", "Environment": Object { "Variables": Object { "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnCustomResourceRoleC2DDF6D8", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 60, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventB8E8CBA3": Object { "DependsOn": Array [ "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy03FB6914", "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventServiceRoleA092B8E4", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf.zip", }, "Description": "AWS CDK resource provider framework - onEvent (test/AmazonChimeSDKSMA/sipRule/sipRuleRequest/PSTNResourceProvider)", "Environment": Object { "Variables": Object { "USER_ON_EVENT_FUNCTION_ARN": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipRulesipRuleRequestpstnResourcesFunction423A406F", "Arn", ], }, }, }, "Handler": "framework.onEvent", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventServiceRoleA092B8E4", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventServiceRoleA092B8E4": 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", }, "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy03FB6914": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "lambda:InvokeFunction", "Effect": "Allow", "Resource": Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipRulesipRuleRequestpstnResourcesFunction423A406F", "Arn", ], }, Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipRulesipRuleRequestpstnResourcesFunction423A406F", "Arn", ], }, ":*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy03FB6914", "Roles": Array [ Object { "Ref": "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventServiceRoleA092B8E4", }, ], }, "Type": "AWS::IAM::Policy", }, "AmazonChimeSDKSMAsipRulesipRuleRequestpstnCustomResourceCDBB2D00": Object { "DeletionPolicy": "Delete", "Properties": Object { "ServiceToken": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipRulesipRuleRequestPSTNResourceProviderframeworkonEventB8E8CBA3", "Arn", ], }, "properties": Object { "name": "testAmazonChimeSDKSMAsipRuleEB50F02E", "targetApplications": Array [ Object { "priority": 1, "region": Object { "Ref": "AWS::Region", }, "sipMediaApplicationId": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipMediaAppsipMediaAppRequestpstnCustomResource275F4D94", "sipMediaAppId", ], }, }, ], "triggerType": "RequestUriHostname", "triggerValue": Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnCustomResource8C2AEEC7", "voiceConnectorId", ], }, ".voiceconnector.chime.aws", ], ], }, }, "resourceType": "SMARule", "uid": "testAmazonChimeSDKSMAsipRuleEB50F02E", }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "AmazonChimeSDKSMAsipRulesipRuleRequestpstnCustomResourceRoleE103D23A": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Description": "Amazon Chime PSTN Resources", "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", ], ], }, ], "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "chime:*VoiceProfileDomain*", "kms:CreateGrant", "kms:DescribeKey", "chime:*MediaInsightsPipelineConfiguration*", "chime:CreateSipRule", "chime:DeleteSipRule", "chime:UpdateSipRule", "chime:GetSipRule", "chime:CreateSipMediaApplication", "chime:DeleteSipMediaApplication", "chime:GetPhoneNumberOrder", "chime:SearchAvailablePhoneNumbers", "chime:CreatePhoneNumberOrder", "chime:DeletePhoneNumber", "chime:GetPhoneNumber", "chime:CreateVoiceConnector", "chime:PutVoiceConnectorStreamingConfiguration", "chime:PutVoiceConnectorTermination", "chime:PutVoiceConnectorOrigination", "chime:PutVoiceConnectorLoggingConfiguration", "chime:ListPhoneNumbers", "chime:AssociatePhoneNumbersWithVoiceConnector", "chime:DisassociatePhoneNumbersFromVoiceConnector", "chime:DeleteVoiceConnector", "chime:PutSipMediaApplicationAlexaSkillConfiguration", "chime:PutSipMediaApplicationLoggingConfiguration", "logs:GetLogDelivery", "logs:DeleteLogDelivery", "logs:ListLogDeliveries", "logs:CreateLogGroup", "logs:DescribeResourcePolicies", "logs:PutResourcePolicy", "logs:DescribeLogGroups", "logs:CreateLogDelivery", "lambda:GetPolicy", "lambda:AddPermission", "iam:PutRolePolicy", "iam:CreateServiceLinkedRole", ], "Effect": "Allow", "Resource": "*", }, Object { "Action": Array [ "ssm:PutParameter", "ssm:GetParameter", "ssm:DeleteParameter", ], "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:aws:ssm:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":parameter/chime/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "chimePolicy", }, ], }, "Type": "AWS::IAM::Role", }, "AmazonChimeSDKSMAsipRulesipRuleRequestpstnResourcesFunction423A406F": Object { "DependsOn": Array [ "AmazonChimeSDKSMAsipRulesipRuleRequestpstnCustomResourceRoleE103D23A", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "17adca7ffd51a469d35bc3b81f5a0add6f87532707cf8ab5b2b4569f57d29d2a.zip", }, "Description": "src/resources/pstn/pstn.lambda.ts", "Environment": Object { "Variables": Object { "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsipRulesipRuleRequestpstnCustomResourceRoleE103D23A", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 60, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKSMAsmaHandlerLambda4FD8110E": Object { "DependsOn": Array [ "AmazonChimeSDKSMAsmaHandlerRoleDefaultPolicy8E33E811", "AmazonChimeSDKSMAsmaHandlerRole7A5C0FC0", ], "Properties": Object { "Architectures": Array [ "arm64", ], "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "6271b057de970f5b451d130d58d07f2c1f9376c66a5dd0b5afd89568c5f6881a.zip", }, "Environment": Object { "Variables": Object { "ACCOUNT_ID": Object { "Ref": "AWS::AccountId", }, "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "LEX_BOT_ALIAS_ID": Object { "Fn::GetAtt": Array [ "LexchimeLexBotAlias275DAEDB", "BotAliasId", ], }, "LEX_BOT_ID": Object { "Fn::GetAtt": Array [ "LexchimeLexBot2A96F463", "Id", ], }, "MEETINGS_TABLE_NAME": Object { "Ref": "DatabasecallerTableBB5C7489", }, }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKSMAsmaHandlerRole7A5C0FC0", "Arn", ], }, "Runtime": "nodejs16.x", "Timeout": 60, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKSMAsmaHandlerRole7A5C0FC0": 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", ], ], }, ], "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "chime:*", "Effect": "Allow", "Resource": "*", }, ], "Version": "2012-10-17", }, "PolicyName": "chimePolicy", }, ], }, "Type": "AWS::IAM::Role", }, "AmazonChimeSDKSMAsmaHandlerRoleDefaultPolicy8E33E811": 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 [ "DatabasecallerTableBB5C7489", "Arn", ], }, Object { "Ref": "AWS::NoValue", }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "AmazonChimeSDKSMAsmaHandlerRoleDefaultPolicy8E33E811", "Roles": Array [ Object { "Ref": "AmazonChimeSDKSMAsmaHandlerRole7A5C0FC0", }, ], }, "Type": "AWS::IAM::Policy", }, "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEvent675296DF": Object { "DependsOn": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicyDAD401A7", "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleA3EAAF64", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf.zip", }, "Description": "AWS CDK resource provider framework - onEvent (test/AmazonChimeSDKVoice/pstnVoiceConnector/voiceConnectorRequest/PSTNResourceProvider)", "Environment": Object { "Variables": Object { "USER_ON_EVENT_FUNCTION_ARN": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnResourcesFunctionAC0BF4BE", "Arn", ], }, }, }, "Handler": "framework.onEvent", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleA3EAAF64", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleA3EAAF64": 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", }, "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicyDAD401A7": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "lambda:InvokeFunction", "Effect": "Allow", "Resource": Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnResourcesFunctionAC0BF4BE", "Arn", ], }, Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnResourcesFunctionAC0BF4BE", "Arn", ], }, ":*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicyDAD401A7", "Roles": Array [ Object { "Ref": "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleA3EAAF64", }, ], }, "Type": "AWS::IAM::Policy", }, "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnCustomResource0EB2B74C": Object { "DeletionPolicy": "Delete", "Properties": Object { "ServiceToken": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEvent675296DF", "Arn", ], }, "properties": Object { "encryption": false, "name": "testAmazonChimeSDKVoicepstnVoiceConnector268C659F", "origination": Array [ Object { "host": Object { "Ref": "VPCserverEip15B58F30", }, "port": 5060, "priority": 1, "protocol": "UDP", "weight": 1, }, ], "region": Object { "Ref": "AWS::Region", }, "termination": Object { "callingRegions": Array [ "US", ], "terminationCidrs": Array [ Object { "Fn::Join": Array [ "", Array [ Object { "Ref": "VPCserverEip15B58F30", }, "/32", ], ], }, ], }, }, "resourceType": "VoiceConnector", "uid": "testAmazonChimeSDKVoicepstnVoiceConnector268C659F", }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnCustomResourceRoleFCC6A4F9": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Description": "Amazon Chime PSTN Resources", "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", ], ], }, ], "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "chime:*VoiceProfileDomain*", "kms:CreateGrant", "kms:DescribeKey", "chime:*MediaInsightsPipelineConfiguration*", "chime:CreateSipRule", "chime:DeleteSipRule", "chime:UpdateSipRule", "chime:GetSipRule", "chime:CreateSipMediaApplication", "chime:DeleteSipMediaApplication", "chime:GetPhoneNumberOrder", "chime:SearchAvailablePhoneNumbers", "chime:CreatePhoneNumberOrder", "chime:DeletePhoneNumber", "chime:GetPhoneNumber", "chime:CreateVoiceConnector", "chime:PutVoiceConnectorStreamingConfiguration", "chime:PutVoiceConnectorTermination", "chime:PutVoiceConnectorOrigination", "chime:PutVoiceConnectorLoggingConfiguration", "chime:ListPhoneNumbers", "chime:AssociatePhoneNumbersWithVoiceConnector", "chime:DisassociatePhoneNumbersFromVoiceConnector", "chime:DeleteVoiceConnector", "chime:PutSipMediaApplicationAlexaSkillConfiguration", "chime:PutSipMediaApplicationLoggingConfiguration", "logs:GetLogDelivery", "logs:DeleteLogDelivery", "logs:ListLogDeliveries", "logs:CreateLogGroup", "logs:DescribeResourcePolicies", "logs:PutResourcePolicy", "logs:DescribeLogGroups", "logs:CreateLogDelivery", "lambda:GetPolicy", "lambda:AddPermission", "iam:PutRolePolicy", "iam:CreateServiceLinkedRole", ], "Effect": "Allow", "Resource": "*", }, Object { "Action": Array [ "ssm:PutParameter", "ssm:GetParameter", "ssm:DeleteParameter", ], "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:aws:ssm:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":parameter/chime/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "chimePolicy", }, ], }, "Type": "AWS::IAM::Role", }, "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnResourcesFunctionAC0BF4BE": Object { "DependsOn": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnCustomResourceRoleFCC6A4F9", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "17adca7ffd51a469d35bc3b81f5a0add6f87532707cf8ab5b2b4569f57d29d2a.zip", }, "Description": "src/resources/pstn/pstn.lambda.ts", "Environment": Object { "Variables": Object { "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnCustomResourceRoleFCC6A4F9", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 60, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEvent1EBFD99D": Object { "DependsOn": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy94773112", "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleE28C8FF7", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf.zip", }, "Description": "AWS CDK resource provider framework - onEvent (test/AmazonChimeSDKVoice/smaVoiceConnector/voiceConnectorRequest/PSTNResourceProvider)", "Environment": Object { "Variables": Object { "USER_ON_EVENT_FUNCTION_ARN": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnResourcesFunction9BEA4D77", "Arn", ], }, }, }, "Handler": "framework.onEvent", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleE28C8FF7", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy94773112": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "lambda:InvokeFunction", "Effect": "Allow", "Resource": Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnResourcesFunction9BEA4D77", "Arn", ], }, Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnResourcesFunction9BEA4D77", "Arn", ], }, ":*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy94773112", "Roles": Array [ Object { "Ref": "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleE28C8FF7", }, ], }, "Type": "AWS::IAM::Policy", }, "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEventServiceRoleE28C8FF7": 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", }, "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnCustomResource8C2AEEC7": Object { "DeletionPolicy": "Delete", "Properties": Object { "ServiceToken": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestPSTNResourceProviderframeworkonEvent1EBFD99D", "Arn", ], }, "properties": Object { "encryption": false, "name": "testAmazonChimeSDKVoicesmaVoiceConnectorD0307778", "region": Object { "Ref": "AWS::Region", }, "termination": Object { "callingRegions": Array [ "US", ], "terminationCidrs": Array [ Object { "Fn::Join": Array [ "", Array [ Object { "Ref": "VPCserverEip15B58F30", }, "/32", ], ], }, ], }, }, "resourceType": "VoiceConnector", "uid": "testAmazonChimeSDKVoicesmaVoiceConnectorD0307778", }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnCustomResourceRoleAAB30875": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Description": "Amazon Chime PSTN Resources", "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", ], ], }, ], "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "chime:*VoiceProfileDomain*", "kms:CreateGrant", "kms:DescribeKey", "chime:*MediaInsightsPipelineConfiguration*", "chime:CreateSipRule", "chime:DeleteSipRule", "chime:UpdateSipRule", "chime:GetSipRule", "chime:CreateSipMediaApplication", "chime:DeleteSipMediaApplication", "chime:GetPhoneNumberOrder", "chime:SearchAvailablePhoneNumbers", "chime:CreatePhoneNumberOrder", "chime:DeletePhoneNumber", "chime:GetPhoneNumber", "chime:CreateVoiceConnector", "chime:PutVoiceConnectorStreamingConfiguration", "chime:PutVoiceConnectorTermination", "chime:PutVoiceConnectorOrigination", "chime:PutVoiceConnectorLoggingConfiguration", "chime:ListPhoneNumbers", "chime:AssociatePhoneNumbersWithVoiceConnector", "chime:DisassociatePhoneNumbersFromVoiceConnector", "chime:DeleteVoiceConnector", "chime:PutSipMediaApplicationAlexaSkillConfiguration", "chime:PutSipMediaApplicationLoggingConfiguration", "logs:GetLogDelivery", "logs:DeleteLogDelivery", "logs:ListLogDeliveries", "logs:CreateLogGroup", "logs:DescribeResourcePolicies", "logs:PutResourcePolicy", "logs:DescribeLogGroups", "logs:CreateLogDelivery", "lambda:GetPolicy", "lambda:AddPermission", "iam:PutRolePolicy", "iam:CreateServiceLinkedRole", ], "Effect": "Allow", "Resource": "*", }, Object { "Action": Array [ "ssm:PutParameter", "ssm:GetParameter", "ssm:DeleteParameter", ], "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:aws:ssm:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":parameter/chime/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "chimePolicy", }, ], }, "Type": "AWS::IAM::Role", }, "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnResourcesFunction9BEA4D77": Object { "DependsOn": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnCustomResourceRoleAAB30875", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "17adca7ffd51a469d35bc3b81f5a0add6f87532707cf8ab5b2b4569f57d29d2a.zip", }, "Description": "src/resources/pstn/pstn.lambda.ts", "Environment": Object { "Variables": Object { "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnCustomResourceRoleAAB30875", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 60, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventBCB2A377": Object { "DependsOn": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy7C78EDFD", "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventServiceRole893510FD", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf.zip", }, "Description": "AWS CDK resource provider framework - onEvent (test/AmazonChimeSDKVoice/voiceConnectorPhoneNumber/ChimePhoneNumber/PSTNResourceProvider)", "Environment": Object { "Variables": Object { "USER_ON_EVENT_FUNCTION_ARN": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnResourcesFunction31E7DF51", "Arn", ], }, }, }, "Handler": "framework.onEvent", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventServiceRole893510FD", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventServiceRole893510FD": 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", }, "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy7C78EDFD": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "lambda:InvokeFunction", "Effect": "Allow", "Resource": Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnResourcesFunction31E7DF51", "Arn", ], }, Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnResourcesFunction31E7DF51", "Arn", ], }, ":*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventServiceRoleDefaultPolicy7C78EDFD", "Roles": Array [ Object { "Ref": "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventServiceRole893510FD", }, ], }, "Type": "AWS::IAM::Policy", }, "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnCustomResource0292ED71": Object { "DeletionPolicy": "Delete", "Properties": Object { "ServiceToken": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberPSTNResourceProviderframeworkonEventBCB2A377", "Arn", ], }, "properties": Object { "phoneCountry": "US", "phoneNumberType": "Local", "phoneProductType": "VoiceConnector", "phoneState": "IL", }, "resourceType": "PhoneNumber", "uid": "testAmazonChimeSDKVoicevoiceConnectorPhoneNumber6A75CCA8", }, "Type": "AWS::CloudFormation::CustomResource", "UpdateReplacePolicy": "Delete", }, "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnCustomResourceRole85DD0CB5": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Description": "Amazon Chime PSTN Resources", "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", ], ], }, ], "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "chime:*VoiceProfileDomain*", "kms:CreateGrant", "kms:DescribeKey", "chime:*MediaInsightsPipelineConfiguration*", "chime:CreateSipRule", "chime:DeleteSipRule", "chime:UpdateSipRule", "chime:GetSipRule", "chime:CreateSipMediaApplication", "chime:DeleteSipMediaApplication", "chime:GetPhoneNumberOrder", "chime:SearchAvailablePhoneNumbers", "chime:CreatePhoneNumberOrder", "chime:DeletePhoneNumber", "chime:GetPhoneNumber", "chime:CreateVoiceConnector", "chime:PutVoiceConnectorStreamingConfiguration", "chime:PutVoiceConnectorTermination", "chime:PutVoiceConnectorOrigination", "chime:PutVoiceConnectorLoggingConfiguration", "chime:ListPhoneNumbers", "chime:AssociatePhoneNumbersWithVoiceConnector", "chime:DisassociatePhoneNumbersFromVoiceConnector", "chime:DeleteVoiceConnector", "chime:PutSipMediaApplicationAlexaSkillConfiguration", "chime:PutSipMediaApplicationLoggingConfiguration", "logs:GetLogDelivery", "logs:DeleteLogDelivery", "logs:ListLogDeliveries", "logs:CreateLogGroup", "logs:DescribeResourcePolicies", "logs:PutResourcePolicy", "logs:DescribeLogGroups", "logs:CreateLogDelivery", "lambda:GetPolicy", "lambda:AddPermission", "iam:PutRolePolicy", "iam:CreateServiceLinkedRole", ], "Effect": "Allow", "Resource": "*", }, Object { "Action": Array [ "ssm:PutParameter", "ssm:GetParameter", "ssm:DeleteParameter", ], "Effect": "Allow", "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:aws:ssm:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":parameter/chime/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "chimePolicy", }, ], }, "Type": "AWS::IAM::Role", }, "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnResourcesFunction31E7DF51": Object { "DependsOn": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnCustomResourceRole85DD0CB5", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "17adca7ffd51a469d35bc3b81f5a0add6f87532707cf8ab5b2b4569f57d29d2a.zip", }, "Description": "src/resources/pstn/pstn.lambda.ts", "Environment": Object { "Variables": Object { "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnCustomResourceRole85DD0CB5", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 60, }, "Type": "AWS::Lambda::Function", }, "AmazonChimeSDKVoicevoiceConnectorPhoneNumberphoneAssociationCustomResourcePolicy7E66F613": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "chime:AssociatePhoneNumbersWithVoiceConnector", "Effect": "Allow", "Resource": "*", }, Object { "Action": "chime:DisassociatePhoneNumbersFromVoiceConnector", "Effect": "Allow", "Resource": "*", }, ], "Version": "2012-10-17", }, "PolicyName": "AmazonChimeSDKVoicevoiceConnectorPhoneNumberphoneAssociationCustomResourcePolicy7E66F613", "Roles": Array [ Object { "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", }, ], }, "Type": "AWS::IAM::Policy", }, "AmazonChimeSDKVoicevoiceConnectorPhoneNumberphoneAssociationE3A0A97D": Object { "DeletionPolicy": "Delete", "DependsOn": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberphoneAssociationCustomResourcePolicy7E66F613", ], "Properties": Object { "Create": Object { "Fn::Join": Array [ "", Array [ "{\\"service\\":\\"Chime\\",\\"action\\":\\"associatePhoneNumbersWithVoiceConnector\\",\\"region\\":\\"us-east-1\\",\\"parameters\\":{\\"E164PhoneNumbers\\":[\\"", Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnCustomResource0292ED71", "phoneNumber", ], }, "\\"],\\"VoiceConnectorId\\":\\"", Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnCustomResource0EB2B74C", "voiceConnectorId", ], }, "\\",\\"ForceAssociate\\":true},\\"physicalResourceId\\":{\\"id\\":\\"testAmazonChimeSDKVoicevoiceConnectorPhoneNumberphoneAssociationA0CC1FA8\\"}}", ], ], }, "Delete": Object { "Fn::Join": Array [ "", Array [ "{\\"service\\":\\"Chime\\",\\"action\\":\\"disassociatePhoneNumbersFromVoiceConnector\\",\\"region\\":\\"us-east-1\\",\\"parameters\\":{\\"E164PhoneNumbers\\":[\\"", Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnCustomResource0292ED71", "phoneNumber", ], }, "\\"],\\"VoiceConnectorId\\":\\"", Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnCustomResource0EB2B74C", "voiceConnectorId", ], }, "\\"},\\"physicalResourceId\\":{\\"id\\":\\"testAmazonChimeSDKVoicevoiceConnectorPhoneNumberphoneAssociationA0CC1FA8\\"}}", ], ], }, "InstallLatestAwsSdk": true, "ServiceToken": Object { "Fn::GetAtt": Array [ "AWS679f53fac002430cb0da5b7982bd22872D164C4C", "Arn", ], }, }, "Type": "Custom::AWS", "UpdateReplacePolicy": "Delete", }, "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": Object { "DependsOn": Array [ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", ], "Properties": Object { "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "a657308e723bb9460b800cb3b47dadb74e28243edfe246bf7755c45ec312eb97.zip", }, "Description": Object { "Fn::Join": Array [ "", Array [ "Lambda function for auto-deleting objects in ", Object { "Ref": "LexlexAudioBucket4C097646", }, " S3 bucket.", ], ], }, "Handler": "index.handler", "MemorySize": 128, "Role": Object { "Fn::GetAtt": Array [ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", "Arn", ], }, "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", }, "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": 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::Sub": "arn:\${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", }, ], }, "Type": "AWS::IAM::Role", }, "DatabasecallerTableBB5C7489": Object { "DeletionPolicy": "Delete", "Properties": Object { "AttributeDefinitions": Array [ Object { "AttributeName": "CallId", "AttributeType": "S", }, ], "BillingMode": "PAY_PER_REQUEST", "KeySchema": Array [ Object { "AttributeName": "CallId", "KeyType": "HASH", }, ], "TableName": "LexContactCenterDatabase98c8c235", "TimeToLiveSpecification": Object { "AttributeName": "TTL", "Enabled": true, }, }, "Type": "AWS::DynamoDB::Table", "UpdateReplacePolicy": "Delete", }, "InfrastructurecallQueryLambdaF4D2E612": Object { "DependsOn": Array [ "InfrastructureinfrastructureRoleDefaultPolicy0F2BD00C", "InfrastructureinfrastructureRole80511D48", ], "Properties": Object { "Architectures": Array [ "arm64", ], "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "a80c7ec5664f850f8cdbf6c0216bb776eb50bcbc307ba5f1389ace483e672895.zip", }, "Environment": Object { "Variables": Object { "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "CALLER_TABLE_NAME": Object { "Ref": "DatabasecallerTableBB5C7489", }, }, }, "Handler": "index.handler", "Role": Object { "Fn::GetAtt": Array [ "InfrastructureinfrastructureRole80511D48", "Arn", ], }, "Runtime": "nodejs16.x", "Timeout": 60, }, "Type": "AWS::Lambda::Function", }, "InfrastructureinfrastructureRole80511D48": 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", }, "InfrastructureinfrastructureRoleDefaultPolicy0F2BD00C": 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 [ "DatabasecallerTableBB5C7489", "Arn", ], }, Object { "Ref": "AWS::NoValue", }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "InfrastructureinfrastructureRoleDefaultPolicy0F2BD00C", "Roles": Array [ Object { "Ref": "InfrastructureinfrastructureRole80511D48", }, ], }, "Type": "AWS::IAM::Policy", }, "InfrastructurelexContactCenter93E20989": Object { "Properties": Object { "EndpointConfiguration": Object { "Types": Array [ "REGIONAL", ], }, "Name": "lexContactCenter", }, "Type": "AWS::ApiGateway::RestApi", }, "InfrastructurelexContactCenterAccountF84AF02D": Object { "DeletionPolicy": "Retain", "DependsOn": Array [ "InfrastructurelexContactCenter93E20989", ], "Properties": Object { "CloudWatchRoleArn": Object { "Fn::GetAtt": Array [ "InfrastructurelexContactCenterCloudWatchRole7DFB3036", "Arn", ], }, }, "Type": "AWS::ApiGateway::Account", "UpdateReplacePolicy": "Retain", }, "InfrastructurelexContactCenterCloudWatchRole7DFB3036": Object { "DeletionPolicy": "Retain", "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "apigateway.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs", ], ], }, ], }, "Type": "AWS::IAM::Role", "UpdateReplacePolicy": "Retain", }, "InfrastructurelexContactCenterDeployment6D6E53A87ce96ef4634921dc4f94c87190d0ad79": Object { "DependsOn": Array [ "InfrastructurelexContactCenterOPTIONS237E218E", "InfrastructurelexContactCenterqueryGET5D698978", "InfrastructurelexContactCenterqueryOPTIONS044672A5", "InfrastructurelexContactCenterquery54BDB2F5", ], "Properties": Object { "Description": "Automatically created by the RestApi construct", "RestApiId": Object { "Ref": "InfrastructurelexContactCenter93E20989", }, }, "Type": "AWS::ApiGateway::Deployment", }, "InfrastructurelexContactCenterDeploymentStageprod655257E5": Object { "DependsOn": Array [ "InfrastructurelexContactCenterAccountF84AF02D", ], "Properties": Object { "DeploymentId": Object { "Ref": "InfrastructurelexContactCenterDeployment6D6E53A87ce96ef4634921dc4f94c87190d0ad79", }, "MethodSettings": Array [ Object { "DataTraceEnabled": true, "HttpMethod": "*", "LoggingLevel": "INFO", "ResourcePath": "/*", }, ], "RestApiId": Object { "Ref": "InfrastructurelexContactCenter93E20989", }, "StageName": "prod", }, "Type": "AWS::ApiGateway::Stage", }, "InfrastructurelexContactCenterOPTIONS237E218E": Object { "Properties": Object { "ApiKeyRequired": false, "AuthorizationType": "NONE", "HttpMethod": "OPTIONS", "Integration": Object { "IntegrationResponses": Array [ Object { "ResponseParameters": Object { "method.response.header.Access-Control-Allow-Credentials": "'true'", "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET'", "method.response.header.Access-Control-Allow-Origin": "'*'", }, "StatusCode": "204", }, ], "RequestTemplates": Object { "application/json": "{ statusCode: 200 }", }, "Type": "MOCK", }, "MethodResponses": Array [ Object { "ResponseParameters": Object { "method.response.header.Access-Control-Allow-Credentials": true, "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": Object { "Fn::GetAtt": Array [ "InfrastructurelexContactCenter93E20989", "RootResourceId", ], }, "RestApiId": Object { "Ref": "InfrastructurelexContactCenter93E20989", }, }, "Type": "AWS::ApiGateway::Method", }, "InfrastructurelexContactCenterquery54BDB2F5": Object { "Properties": Object { "ParentId": Object { "Fn::GetAtt": Array [ "InfrastructurelexContactCenter93E20989", "RootResourceId", ], }, "PathPart": "query", "RestApiId": Object { "Ref": "InfrastructurelexContactCenter93E20989", }, }, "Type": "AWS::ApiGateway::Resource", }, "InfrastructurelexContactCenterqueryGET5D698978": Object { "Properties": Object { "AuthorizationType": "NONE", "HttpMethod": "GET", "Integration": Object { "IntegrationHttpMethod": "POST", "Type": "AWS_PROXY", "Uri": 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 [ "InfrastructurecallQueryLambdaF4D2E612", "Arn", ], }, "/invocations", ], ], }, }, "RequestParameters": Object { "method.request.querystring.xCallId": false, }, "ResourceId": Object { "Ref": "InfrastructurelexContactCenterquery54BDB2F5", }, "RestApiId": Object { "Ref": "InfrastructurelexContactCenter93E20989", }, }, "Type": "AWS::ApiGateway::Method", }, "InfrastructurelexContactCenterqueryGETApiPermissionTesttestInfrastructurelexContactCenter0ED522DBGETquery5C3780CB": Object { "Properties": Object { "Action": "lambda:InvokeFunction", "FunctionName": Object { "Fn::GetAtt": Array [ "InfrastructurecallQueryLambdaF4D2E612", "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": "InfrastructurelexContactCenter93E20989", }, "/test-invoke-stage/GET/query", ], ], }, }, "Type": "AWS::Lambda::Permission", }, "InfrastructurelexContactCenterqueryGETApiPermissiontestInfrastructurelexContactCenter0ED522DBGETquery5E7DCF9E": Object { "Properties": Object { "Action": "lambda:InvokeFunction", "FunctionName": Object { "Fn::GetAtt": Array [ "InfrastructurecallQueryLambdaF4D2E612", "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": "InfrastructurelexContactCenter93E20989", }, "/", Object { "Ref": "InfrastructurelexContactCenterDeploymentStageprod655257E5", }, "/GET/query", ], ], }, }, "Type": "AWS::Lambda::Permission", }, "InfrastructurelexContactCenterqueryOPTIONS044672A5": Object { "Properties": Object { "ApiKeyRequired": false, "AuthorizationType": "NONE", "HttpMethod": "OPTIONS", "Integration": Object { "IntegrationResponses": Array [ Object { "ResponseParameters": Object { "method.response.header.Access-Control-Allow-Credentials": "'true'", "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", "method.response.header.Access-Control-Allow-Methods": "'OPTIONS,GET'", "method.response.header.Access-Control-Allow-Origin": "'*'", }, "StatusCode": "204", }, ], "RequestTemplates": Object { "application/json": "{ statusCode: 200 }", }, "Type": "MOCK", }, "MethodResponses": Array [ Object { "ResponseParameters": Object { "method.response.header.Access-Control-Allow-Credentials": true, "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": Object { "Ref": "InfrastructurelexContactCenterquery54BDB2F5", }, "RestApiId": Object { "Ref": "InfrastructurelexContactCenter93E20989", }, }, "Type": "AWS::ApiGateway::Method", }, "LexLexResourcePolicy80A19810": Object { "Properties": Object { "Policy": Object { "Statement": Array [ Object { "Action": "lex:StartConversation", "Condition": Object { "ArnEquals": Object { "AWS:SourceArn": Object { "Fn::Join": Array [ "", Array [ "arn:aws:voiceconnector:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":*", ], ], }, }, "StringEquals": Object { "AWS:SourceAccount": Object { "Ref": "AWS::AccountId", }, }, }, "Effect": "Allow", "Principal": Object { "Service": "voiceconnector.chime.amazonaws.com", }, "Resource": Object { "Fn::Join": Array [ "", Array [ "arn:aws:lex:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":bot-alias/", Object { "Fn::GetAtt": Array [ "LexchimeLexBot2A96F463", "Id", ], }, "/", Object { "Fn::GetAtt": Array [ "LexchimeLexBotAlias275DAEDB", "BotAliasId", ], }, ], ], }, "Sid": "AllowChimePstnAudioUseBot", }, ], "Version": "2012-10-17", }, "ResourceArn": Object { "Fn::Join": Array [ "", Array [ "arn:aws:lex:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":bot-alias/", Object { "Fn::GetAtt": Array [ "LexchimeLexBot2A96F463", "Id", ], }, "/", Object { "Fn::GetAtt": Array [ "LexchimeLexBotAlias275DAEDB", "BotAliasId", ], }, ], ], }, }, "Type": "AWS::Lex::ResourcePolicy", }, "LexchimeLexBot2A96F463": Object { "Properties": Object { "AutoBuildBotLocales": true, "BotLocales": Array [ Object { "Description": "English_US", "Intents": Array [ Object { "Description": "Intent to check the balance in the specified account type", "FulfillmentCodeHook": Object { "Enabled": true, }, "IntentClosingSetting": Object { "ClosingResponse": Object { "AllowInterrupt": false, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "Thanks for checking your balance. Have a nice day.", }, }, }, ], }, "IsActive": true, }, "Name": "CheckBalance", "OutputContexts": Array [ Object { "Name": "contextCheckBalance", "TimeToLiveInSeconds": 90, "TurnsToLive": 5, }, ], "SampleUtterances": Array [ Object { "Utterance": "What’s the balance in my account ?", }, Object { "Utterance": "Check my account balance", }, Object { "Utterance": "What’s the balance in my {accountType} account ?", }, Object { "Utterance": "How much do I have in {accountType} ?", }, Object { "Utterance": "I want to check the balance", }, Object { "Utterance": "Can you help me with account balance ?", }, Object { "Utterance": "Balance in {accountType}", }, ], "SlotPriorities": Array [ Object { "Priority": 1, "SlotName": "accountType", }, Object { "Priority": 2, "SlotName": "dateOfBirth", }, ], "Slots": Array [ Object { "Name": "accountType", "SlotTypeName": "accountType", "ValueElicitationSetting": Object { "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "For which account would you like your balance?", }, }, }, ], }, "SlotConstraint": "Required", }, }, Object { "Name": "dateOfBirth", "SlotTypeName": "AMAZON.Date", "ValueElicitationSetting": Object { "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "For verification purposes, what is your date of birth?", }, }, }, ], }, "SlotConstraint": "Required", }, }, ], }, Object { "Description": "Intent to open the specified account type", "DialogCodeHook": Object { "Enabled": true, }, "IntentConfirmationSetting": Object { "DeclinationResponse": Object { "AllowInterrupt": true, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "Lets try that again", }, }, }, ], }, "IsActive": true, "PromptSpecification": Object { "AllowInterrupt": true, "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "SSMLMessage": Object { "Value": "Is your phone number [phoneNumber] ?", }, }, }, ], }, }, "Name": "OpenAccount", "OutputContexts": Array [ Object { "Name": "contextCreateAccount", "TimeToLiveInSeconds": 90, "TurnsToLive": 5, }, ], "SampleUtterances": Array [ Object { "Utterance": "Open an account", }, Object { "Utterance": "Create account", }, Object { "Utterance": "Open {accountType} account", }, Object { "Utterance": "Create {accountType} account", }, ], "SlotPriorities": Array [ Object { "Priority": 1, "SlotName": "accountType", }, Object { "Priority": 2, "SlotName": "firstName", }, Object { "Priority": 3, "SlotName": "lastName", }, Object { "Priority": 4, "SlotName": "phoneNumber", }, ], "Slots": Array [ Object { "Name": "accountType", "SlotTypeName": "accountType", "ValueElicitationSetting": Object { "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "What account type would you like to open?", }, }, }, ], }, "SlotConstraint": "Required", }, }, Object { "Name": "firstName", "SlotTypeName": "AMAZON.FirstName", "ValueElicitationSetting": Object { "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "What is your first name?", }, }, }, ], }, "SlotConstraint": "Required", }, }, Object { "Name": "lastName", "SlotTypeName": "AMAZON.LastName", "ValueElicitationSetting": Object { "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "What is your last name?", }, }, }, ], }, "SlotConstraint": "Required", }, }, Object { "Name": "phoneNumber", "SlotTypeName": "AMAZON.PhoneNumber", "ValueElicitationSetting": Object { "DefaultValueSpecification": Object { "DefaultValueList": Array [ Object { "DefaultValue": "[phoneNumber]", }, ], }, "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "What is your phone number?", }, }, }, ], }, "SlotConstraint": "Required", }, }, ], }, Object { "Description": "Help user transfer funds between bank accounts", "FulfillmentCodeHook": Object { "Enabled": false, }, "IntentClosingSetting": Object { "ClosingResponse": Object { "AllowInterrupt": false, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "Thanks for transferring funds. Have a nice day.", }, }, }, ], }, "IsActive": true, }, "IntentConfirmationSetting": Object { "DeclinationResponse": Object { "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "The transfer has been cancelled", }, }, }, ], }, "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "Got it. So we are transferring {transferAmount} from {sourceAccountType} to {targetAccountType}. Can I go ahead with the transfer?", }, }, }, ], }, }, "Name": "TransferFunds", "SampleUtterances": Array [ Object { "Utterance": "I want to transfer funds", }, Object { "Utterance": "Can I make a transfer?", }, Object { "Utterance": "I want to make a transfer", }, Object { "Utterance": "I'd like to transfer {transferAmount} from {sourceAccountType} to {targetAccountType}", }, Object { "Utterance": "Can I transfer {transferAmount} to my {targetAccountType}", }, Object { "Utterance": "Would you be able to help me with a transfer?", }, Object { "Utterance": "Need to make a transfer", }, ], "SlotPriorities": Array [ Object { "Priority": 1, "SlotName": "sourceAccountType", }, Object { "Priority": 2, "SlotName": "targetAccountType", }, Object { "Priority": 3, "SlotName": "transferAmount", }, ], "Slots": Array [ Object { "Name": "sourceAccountType", "SlotTypeName": "accountType", "ValueElicitationSetting": Object { "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "Which account would you like to transfer from?", }, }, }, ], }, "SlotConstraint": "Required", }, }, Object { "Name": "targetAccountType", "SlotTypeName": "accountType", "ValueElicitationSetting": Object { "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "Which account are you transferring to?", }, }, }, ], }, "SlotConstraint": "Required", }, }, Object { "Name": "transferAmount", "SlotTypeName": "AMAZON.Number", "ValueElicitationSetting": Object { "PromptSpecification": Object { "MaxRetries": 2, "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "How much money would you like to transfer?", }, }, }, ], }, "SlotConstraint": "Required", }, }, ], }, Object { "IntentClosingSetting": Object { "ClosingResponse": Object { "MessageGroupsList": Array [ Object { "Message": Object { "PlainTextMessage": Object { "Value": "Sorry I am having trouble understanding. Can you describe what you'd like to do in a few words? I can help you find your account balance, transfer funds and open an account.", }, }, }, ], }, }, "Name": "FallbackIntent", "ParentIntentSignature": "AMAZON.FallbackIntent", }, ], "LocaleId": "en_US", "NluConfidenceThreshold": 0.4, "SlotTypes": Array [ Object { "Description": "Slot Type description", "Name": "accountType", "SlotTypeValues": Array [ Object { "SampleValue": Object { "Value": "Checking", }, }, Object { "SampleValue": Object { "Value": "Savings", }, }, Object { "SampleValue": Object { "Value": "Credit", }, "Synonyms": Array [ Object { "Value": "credit card", }, Object { "Value": "visa", }, Object { "Value": "mastercard", }, Object { "Value": "amex", }, Object { "Value": "american express", }, ], }, ], "ValueSelectionSetting": Object { "ResolutionStrategy": "TOP_RESOLUTION", }, }, ], "VoiceSettings": Object { "Engine": "neural", "VoiceId": "Joanna", }, }, ], "DataPrivacy": Object { "ChildDirected": false, }, "IdleSessionTTLInSeconds": 300, "Name": "ChimeDemo", "RoleArn": Object { "Fn::GetAtt": Array [ "LexlexRoleB28F9876", "Arn", ], }, }, "Type": "AWS::Lex::Bot", }, "LexchimeLexBotAlias275DAEDB": Object { "Properties": Object { "BotAliasLocaleSettings": Array [ Object { "BotAliasLocaleSetting": Object { "CodeHookSpecification": Object { "LambdaCodeHook": Object { "CodeHookInterfaceVersion": "1.0", "LambdaArn": Object { "Fn::GetAtt": Array [ "LexlexCodeHookD5AC5A70", "Arn", ], }, }, }, "Enabled": true, }, "LocaleId": "en_US", }, ], "BotAliasName": "BankerBotDemo", "BotId": Object { "Ref": "LexchimeLexBot2A96F463", }, "BotVersion": Object { "Fn::GetAtt": Array [ "LexchimeLexBotVersion78FD7F20", "BotVersion", ], }, "ConversationLogSettings": Object { "AudioLogSettings": Array [ Object { "Destination": Object { "S3Bucket": Object { "LogPrefix": "chimeLexBot", "S3BucketArn": Object { "Fn::GetAtt": Array [ "LexlexAudioBucket4C097646", "Arn", ], }, }, }, "Enabled": true, }, ], "TextLogSettings": Array [ Object { "Destination": Object { "CloudWatch": Object { "CloudWatchLogGroupArn": Object { "Fn::GetAtt": Array [ "LexlexLogGroupDBC25B45", "Arn", ], }, "LogPrefix": "chimeLexBot", }, }, "Enabled": true, }, ], }, "SentimentAnalysisSettings": Object { "DetectSentiment": true, }, }, "Type": "AWS::Lex::BotAlias", }, "LexchimeLexBotVersion78FD7F20": Object { "Properties": Object { "BotId": Object { "Ref": "LexchimeLexBot2A96F463", }, "BotVersionLocaleSpecification": Array [ Object { "BotVersionLocaleDetails": Object { "SourceBotVersion": "DRAFT", }, "LocaleId": "en_US", }, ], }, "Type": "AWS::Lex::BotVersion", }, "LexlexAudioBucket4C097646": Object { "DeletionPolicy": "Delete", "Properties": Object { "PublicAccessBlockConfiguration": Object { "BlockPublicAcls": true, "BlockPublicPolicy": true, "IgnorePublicAcls": true, "RestrictPublicBuckets": true, }, "Tags": Array [ Object { "Key": "aws-cdk:auto-delete-objects", "Value": "true", }, ], }, "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Delete", }, "LexlexAudioBucketAutoDeleteObjectsCustomResource35D7545E": Object { "DeletionPolicy": "Delete", "DependsOn": Array [ "LexlexAudioBucketPolicy275C5409", ], "Properties": Object { "BucketName": Object { "Ref": "LexlexAudioBucket4C097646", }, "ServiceToken": Object { "Fn::GetAtt": Array [ "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", "Arn", ], }, }, "Type": "Custom::S3AutoDeleteObjects", "UpdateReplacePolicy": "Delete", }, "LexlexAudioBucketPolicy275C5409": Object { "Properties": Object { "Bucket": Object { "Ref": "LexlexAudioBucket4C097646", }, "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", ], "Effect": "Allow", "Principal": Object { "AWS": Object { "Fn::GetAtt": Array [ "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", "Arn", ], }, }, "Resource": Array [ Object { "Fn::GetAtt": Array [ "LexlexAudioBucket4C097646", "Arn", ], }, Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "LexlexAudioBucket4C097646", "Arn", ], }, "/*", ], ], }, ], }, ], "Version": "2012-10-17", }, }, "Type": "AWS::S3::BucketPolicy", }, "LexlexCodeHookD5AC5A70": Object { "DependsOn": Array [ "LexlexCodeHookServiceRoleDefaultPolicyDD03C4E7", "LexlexCodeHookServiceRoleA9E280CA", ], "Properties": Object { "Architectures": Array [ "arm64", ], "Code": Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "0e364db52cd57c364b1bc3ea5fb441fabdfa65f12e5e2e39ae40412bdc5573ec.zip", }, "Environment": Object { "Variables": Object { "CALLER_TABLE_NAME": Object { "Ref": "DatabasecallerTableBB5C7489", }, }, }, "Handler": "index.lambda_handler", "Role": Object { "Fn::GetAtt": Array [ "LexlexCodeHookServiceRoleA9E280CA", "Arn", ], }, "Runtime": "python3.9", "Timeout": 60, }, "Type": "AWS::Lambda::Function", }, "LexlexCodeHookLexInvocation7060DEFC": Object { "Properties": Object { "Action": "lambda:InvokeFunction", "FunctionName": Object { "Fn::GetAtt": Array [ "LexlexCodeHookD5AC5A70", "Arn", ], }, "Principal": "lexv2.amazonaws.com", "SourceArn": Object { "Fn::Join": Array [ "", Array [ "arn:aws:lex:", Object { "Ref": "AWS::Region", }, ":", Object { "Ref": "AWS::AccountId", }, ":bot-alias/", Object { "Fn::GetAtt": Array [ "LexchimeLexBot2A96F463", "Id", ], }, "/", Object { "Fn::GetAtt": Array [ "LexchimeLexBotAlias275DAEDB", "BotAliasId", ], }, ], ], }, }, "Type": "AWS::Lambda::Permission", }, "LexlexCodeHookServiceRoleA9E280CA": 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", }, "LexlexCodeHookServiceRoleDefaultPolicyDD03C4E7": 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 [ "DatabasecallerTableBB5C7489", "Arn", ], }, Object { "Ref": "AWS::NoValue", }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "LexlexCodeHookServiceRoleDefaultPolicyDD03C4E7", "Roles": Array [ Object { "Ref": "LexlexCodeHookServiceRoleA9E280CA", }, ], }, "Type": "AWS::IAM::Policy", }, "LexlexLogGroupDBC25B45": Object { "DeletionPolicy": "Retain", "Properties": Object { "RetentionInDays": 7, }, "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, "LexlexRoleB28F9876": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "lex.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "polly:SynthesizeSpeech", "comprehend:DetectSentiment", ], "Effect": "Allow", "Resource": "*", }, Object { "Action": Array [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", ], "Effect": "Allow", "Resource": Object { "Fn::GetAtt": Array [ "LexlexLogGroupDBC25B45", "Arn", ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "lexPolicy", }, ], }, "Type": "AWS::IAM::Role", }, "LexlexRoleDefaultPolicy667E533C": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "s3:GetObject*", "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", "s3:PutObject", "s3:PutObjectLegalHold", "s3:PutObjectRetention", "s3:PutObjectTagging", "s3:PutObjectVersionTagging", "s3:Abort*", ], "Effect": "Allow", "Resource": Array [ Object { "Fn::GetAtt": Array [ "LexlexAudioBucket4C097646", "Arn", ], }, Object { "Fn::Join": Array [ "", Array [ Object { "Fn::GetAtt": Array [ "LexlexAudioBucket4C097646", "Arn", ], }, "/*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "LexlexRoleDefaultPolicy667E533C", "Roles": Array [ Object { "Ref": "LexlexRoleB28F9876", }, ], }, "Type": "AWS::IAM::Policy", }, "ServerEIPAssociationA690C099": Object { "Properties": Object { "EIP": Object { "Ref": "VPCserverEip15B58F30", }, "InstanceId": Object { "Ref": "ServerInstanceE518391B3f397fb84abf6f47", }, }, "Type": "AWS::EC2::EIPAssociation", }, "ServerInstanceE518391B3f397fb84abf6f47": Object { "CreationPolicy": Object { "ResourceSignal": Object { "Count": 1, "Timeout": "PT10M", }, }, "DependsOn": Array [ "ServerserverEc2RoleDefaultPolicy2995B49A", "ServerserverEc2RoleAA905608", ], "Metadata": Object { "AWS::CloudFormation::Init": Object { "config": Object { "commands": Object { "000": Object { "command": "chmod +x /etc/config_asterisk.sh", }, "001": Object { "command": "/etc/config_asterisk.sh", }, }, "files": Object { "/etc/asterisk/asterisk.conf": Object { "content": "[options] runuser = asterisk rungroup = asterisk", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/etc/asterisk/extensions.conf": Object { "content": "; extensions.conf - the Asterisk dial plan [general] static=yes writeprotect=no clearglobalvars=no [handler] exten => addheader,1,NoOP(Add \${ARG1} to SIP as X-CallId) same => n,NoOP(Add \${ARG2} to SIP as X-Original-Calling-Number) same => n,Set(PJSIP_HEADER(add,X-CallId)=\${ARG1}) same => n,Set(PJSIP_HEADER(add,X-Original-Calling-Number)=\${ARG2}) [contact-center] exten => _+X.,1,NoOP(Inbound Contact Center) same => n,Answer() same => n,Wait(1) same => n,Set(CALL_ID=\${RAND(10000000,99999999)}) same => n,Set(CALLING_NUM=\${CALLERID(num)}) same => n,Set(CALLERID(num)=PSTN_PHONE_NUMBER) same => n,Dial(PJSIP/+18005551212@SMAVoiceConnector,,gb(handler^addheader^1(\${CALL_ID},\${CALLING_NUM}))) same => n,Set(CALL_ROUTE=\${SHELL(curl --silent API_URLquery?xCallId=\${CALL_ID} | jq -r .CallRoute )}) same => n,NoOp(\${CALL_ROUTE}) same => n,GotoIf($[\${CALL_ROUTE} = CallAgent]?callAgent:disconnect) same => n(callAgent),NoOp(CallAgent) same => n,GotoIf($[\${DEVICE_STATE(PJSIP/agent)}=UNAVAILABLE]?noAgent:agentAvailable) same => n(agentAvailable),NoOp(CallAgent) same => n,Dial(PJSIP/agent,,b(handler^addheader^1(\${CALL_ID}))) same => n,Hangup() same => n(noAgent),NoOP(NoAgent) same => n,Playback(/var/lib/asterisk/sounds/en/noAgent) same => n,Hangup() same => n(disconnect),NoOp(Disconnect) same => n,Playback(/var/lib/asterisk/sounds/en/disconnecting) same => n,Hangup() [from-voiceConnector] include => contact-center ", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/etc/asterisk/http.conf": Object { "content": "[general] enabled=yes bindaddr=0.0.0.0 bindport=8088 ", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/etc/asterisk/logger.conf": Object { "content": "[general] [logfiles] console = verbose,notice,warning,error messages = notice,warning,error", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/etc/asterisk/modules.conf": Object { "content": "[modules] autoload = no load = app_bridgewait.so load = app_dial.so load = app_playback.so load = app_stack.so load = app_verbose.so load = app_voicemail.so load = app_directory.so load = app_confbridge.so load = app_queue.so load = app_echo.so load = app_while.so load = app_read.so ; Bridging load = bridge_builtin_features.so load = bridge_builtin_interval_features.so load = bridge_holding.so load = bridge_native_rtp.so load = bridge_simple.so load = bridge_softmix.so ; Call Detail Records load = cdr_custom.so ; Channel Drivers load = chan_bridge_media.so load = chan_pjsip.so ; Codecs load = codec_gsm.so load = codec_resample.so load = codec_ulaw.so load = codec_g722.so ; Formats load = format_gsm.so load = format_pcm.so load = format_wav_gsm.so load = format_wav.so ; Functions load = func_callerid.so load = func_cdr.so load = func_pjsip_endpoint.so load = func_sorcery.so load = func_devstate.so load = func_strings.so load = func_cut.so load = func_rand.so load = func_shell.so load = func_env.so ; Core/PBX load = pbx_config.so ; Resources load = res_http_websocket.so load = res_crypto.so load = res_musiconhold.so load = res_pjproject.so load = res_pjsip_acl.so load = res_pjsip_authenticator_digest.so load = res_pjsip_caller_id.so load = res_pjsip_dialog_info_body_generator.so load = res_pjsip_diversion.so load = res_pjsip_dtmf_info.so load = res_pjsip_endpoint_identifier_anonymous.so load = res_pjsip_endpoint_identifier_ip.so load = res_pjsip_endpoint_identifier_user.so load = res_pjsip_exten_state.so load = res_pjsip_header_funcs.so load = res_pjsip_logger.so load = res_pjsip_messaging.so load = res_pjsip_mwi_body_generator.so load = res_pjsip_mwi.so load = res_pjsip_nat.so load = res_pjsip_notify.so load = res_pjsip_one_touch_record_info.so load = res_pjsip_outbound_authenticator_digest.so load = res_pjsip_outbound_publish.so load = res_pjsip_outbound_registration.so load = res_pjsip_path.so load = res_pjsip_pidf_body_generator.so load = res_pjsip_pidf_digium_body_supplement.so load = res_pjsip_pidf_eyebeam_body_supplement.so load = res_pjsip_publish_asterisk.so load = res_pjsip_pubsub.so load = res_pjsip_refer.so load = res_pjsip_registrar.so load = res_pjsip_rfc3326.so load = res_pjsip_sdp_rtp.so load = res_pjsip_send_to_voicemail.so load = res_pjsip_session.so load = res_pjsip.so load = res_pjsip_t38.so load = res_pjsip_transport_websocket.so load = res_pjsip_xpidf_body_generator.so load = res_rtp_asterisk.so load = res_sorcery_astdb.so load = res_sorcery_config.so load = res_sorcery_memory.so load = res_sorcery_realtime.so load = res_timing_timerfd.so load = res_pjsip_transport_websocket.so load = res_http_websocket.so load = res_srtp.so ; Do not load res_hep and kin unless you are using HEP monitoring ; in your network. noload = res_hep.so noload = res_hep_pjsip.so noload = res_hep_rtcp.so", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/etc/asterisk/pjsip.conf": Object { "content": "[udp] type=transport protocol=udp bind=0.0.0.0 external_media_address=PUBLIC_IP external_signaling_address=PUBLIC_IP allow_reload=yes [ws] type=transport protocol=ws bind=0.0.0.0 external_media_address=PUBLIC_IP external_signaling_address=PUBLIC_IP allow_reload=yes [PSTNVoiceConnector] type=endpoint context=from-voiceConnector transport=udp disallow=all allow=ulaw aors=PSTNVoiceConnector direct_media=no ice_support=yes force_rport=yes [PSTNVoiceConnector] type=identify endpoint=PSTNVoiceConnector match=PSTN_VOICE_CONNECTOR.voiceconnector.chime.aws [PSTNVoiceConnector] type=aor contact=sip:PSTN_VOICE_CONNECTOR.voiceconnector.chime.aws [SMAVoiceConnector] type=endpoint context=from-sma transport=udp disallow=all allow=ulaw aors=SMAVoiceConnector direct_media=no ice_support=yes force_rport=yes [SMAVoiceConnector] type=identify endpoint=SMAVoiceConnector match=SMA_VOICE_CONNECTOR.voiceconnector.chime.aws [SMAVoiceConnector] type=aor contact=sip:SMA_VOICE_CONNECTOR.voiceconnector.chime.aws [agent] type=endpoint aors=agent auth=agent dtls_auto_generate_cert=yes webrtc=yes context=phone disallow=all allow=ulaw [agent] type=auth auth_type=userpass username=agent password=INSTANCE_ID [agent] type=aor max_contacts=5", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/etc/asterisk/rtp.conf": Object { "content": "[general] stunaddr=stun.kinesisvideo.us-east-1.amazonaws.com:443", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/etc/config.json": Object { "content": Object { "API_URL": Object { "Fn::Join": Array [ "", Array [ "https://", Object { "Ref": "InfrastructurelexContactCenter93E20989", }, ".execute-api.", Object { "Ref": "AWS::Region", }, ".", Object { "Ref": "AWS::URLSuffix", }, "/", Object { "Ref": "InfrastructurelexContactCenterDeploymentStageprod655257E5", }, "/", ], ], }, "IP": Object { "Ref": "VPCserverEip15B58F30", }, "PSTN_PHONE_NUMBER": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicevoiceConnectorPhoneNumberChimePhoneNumberpstnCustomResource0292ED71", "phoneNumber", ], }, "PSTN_VOICE_CONNECTOR": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicepstnVoiceConnectorvoiceConnectorRequestpstnCustomResource0EB2B74C", "voiceConnectorId", ], }, "REGION": Object { "Ref": "AWS::Region", }, "SMA_VOICE_CONNECTOR": Object { "Fn::GetAtt": Array [ "AmazonChimeSDKVoicesmaVoiceConnectorvoiceConnectorRequestpstnCustomResource8C2AEEC7", "voiceConnectorId", ], }, }, "group": "root", "mode": "000644", "owner": "root", }, "/etc/config_asterisk.sh": Object { "content": "#!/bin/bash -xe PUBLIC_IP=$( jq -r '.IP' /etc/config.json ) PSTN_VOICE_CONNECTOR=$( jq -r '.PSTN_VOICE_CONNECTOR' /etc/config.json ) SMA_VOICE_CONNECTOR=$( jq -r '.SMA_VOICE_CONNECTOR' /etc/config.json ) PSTN_PHONE_NUMBER=$( jq -r '.PSTN_PHONE_NUMBER' /etc/config.json ) API_URL=$( jq -r '.API_URL' /etc/config.json ) TOKEN=\`curl -X PUT \\"http://169.254.169.254/latest/api/token\\" -H \\"X-aws-ec2-metadata-token-ttl-seconds: 21600\\"\` INSTANCE_ID=$( curl -H \\"X-aws-ec2-metadata-token: $TOKEN\\" -v http://169.254.169.254/latest/meta-data/instance-id ) /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/tmp/amazon-cloudwatch-agent.json sed -i \\"s/PUBLIC_IP/$PUBLIC_IP/g\\" /etc/asterisk/pjsip.conf sed -i \\"s/PSTN_VOICE_CONNECTOR/$PSTN_VOICE_CONNECTOR/g\\" /etc/asterisk/pjsip.conf sed -i \\"s/SMA_VOICE_CONNECTOR/$SMA_VOICE_CONNECTOR/g\\" /etc/asterisk/pjsip.conf sed -i \\"s/SMA_VOICE_CONNECTOR/$SMA_VOICE_CONNECTOR/g\\" /etc/asterisk/extensions.conf sed -i \\"s/PSTN_PHONE_NUMBER/$PSTN_PHONE_NUMBER/g\\" /etc/asterisk/extensions.conf sed -i \\"s/PSTN_PHONE_NUMBER/$PSTN_PHONE_NUMBER/g\\" /etc/asterisk/pjsip.conf sed -i \\"s/INSTANCE_ID/$INSTANCE_ID/g\\" /etc/asterisk/pjsip.conf sed -i \\"s+API_URL+$API_URL+g\\" /etc/asterisk/extensions.conf echo \\"PSTN_VOICE_CONNECTOR: \${PSTN_VOICE_CONNECTOR}\\" echo \\"SMA_VOICE_CONNECTOR: \${SMA_VOICE_CONNECTOR}\\" echo \\"PSTN_PHONE_NUMBER: \${PSTN_PHONE_NUMBER}\\" echo \\"INSTANCE_ID: \${INSTANCE_ID}\\" cd /etc/polly/ pip3 install boto3 python3 /etc/polly/createWav.py -file noAgent -text \\"Sorry, no agent is available to take your call at this time. Please try again later.\\" python3 /etc/polly/createWav.py -file disconnecting -text \\"Thanks for calling. We are disconnecting you now.\\" usermod -aG audio,dialout asterisk chown -R asterisk.asterisk /etc/asterisk chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk echo '0 * * * * /sbin/asterisk -rx \\"core reload\\"' > /etc/asterisk/crontab.txt crontab /etc/asterisk/crontab.txt systemctl restart asterisk /sbin/asterisk -rx \\"core reload\\" # cd /home/ubuntu/site # yarn && yarn run build # chown ubuntu:ubuntu /home/ubuntu/site -R # systemctl enable nginx # systemctl restart nginx ", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/etc/polly/createWav.py": Object { "content": "import boto3 import os import wave import argparse import sys from botocore.config import Config config = Config( region_name='us-east-1') polly = boto3.client('polly', config=config) def createPolly(pollyText, fileName): response = polly.synthesize_speech( OutputFormat='pcm', Text=pollyText, SampleRate='8000', VoiceId='Joanna' ) if 'AudioStream' in response: outputWav = '/var/lib/asterisk/sounds/en/' + fileName + '.wav' with wave.open(outputWav, 'wb') as wav_file: wav_file.setparams((1, 2, 8000, 0, 'NONE', 'NONE')) wav_file.writeframes(response['AudioStream'].read()) return outputWav parse_msg = 'Simple utility to create wav files for SMA via Polly' parser = argparse.ArgumentParser(prog='createWav.py', description=parse_msg) parser.add_argument('-file', help='Name of file to be created (without .wav)') parser.add_argument('-text', help='Text of the audio to be created in quotes') args = parser.parse_args() fileName = args.file pollyText = args.text if not fileName: print('Filename is rquired') sys.exit() if not pollyText: print('Text is required') sys.exit() wavFile = createPolly(pollyText, fileName) print('wav file created: ' + wavFile) ", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/home/ubuntu/.ssh/authorized_keys": Object { "content": "xxxxxxxxx", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, "/tmp/amazon-cloudwatch-agent.json": Object { "content": "{ \\"agent\\": { \\"run_as_user\\": \\"root\\" }, \\"logs\\": { \\"logs_collected\\": { \\"files\\": { \\"collect_list\\": [ { \\"file_path\\": \\"/var/log/asterisk_install.log\\", \\"log_group_name\\": \\"/var/log/amazon-chime-sdk-lex/\\", \\"log_stream_name\\": \\"{instance_id}-install\\", \\"retention_in_days\\": 7 }, { \\"file_path\\": \\"/var/log/asterisk/messages\\", \\"log_group_name\\": \\"/var/log/amazon-chime-sdk-lex/\\", \\"log_stream_name\\": \\"{instance_id}-messages\\", \\"retention_in_days\\": 7 }, { \\"file_path\\": \\"/var/log/asterisk_config.log\\", \\"log_group_name\\": \\"/var/log/amazon-chime-sdk-lex/\\", \\"log_stream_name\\": \\"{instance_id}-config\\", \\"retention_in_days\\": 7 } ] } } } }", "encoding": "plain", "group": "root", "mode": "000644", "owner": "root", }, }, }, "configSets": Object { "default": Array [ "config", ], }, }, }, "Properties": Object { "AvailabilityZone": Object { "Fn::Select": Array [ 0, Object { "Fn::GetAZs": "", }, ], }, "IamInstanceProfile": Object { "Ref": "ServerInstanceInstanceProfile5CC6E324", }, "ImageId": Object { "Fn::FindInMap": Array [ "ServerInstanceAmiMap3262B564", Object { "Ref": "AWS::Region", }, "ami", ], }, "InstanceType": "t4g.medium", "SecurityGroupIds": Array [ Object { "Fn::GetAtt": Array [ "Serverec2InstanceSecurityGroupBD9C6329", "GroupId", ], }, Object { "Fn::GetAtt": Array [ "VPCServerSecurityGroup0E1BDC27", "GroupId", ], }, Object { "Fn::GetAtt": Array [ "VPCSSHSecurityGroup0495A24F", "GroupId", ], }, ], "SubnetId": Object { "Ref": "VPCServerPublicSubnet1SubnetF3987995", }, "Tags": Array [ Object { "Key": "Name", "Value": "Amazon Chime SDK with Lex", }, ], "UserData": Object { "Fn::Base64": Object { "Fn::Join": Array [ "", Array [ "#!/bin/bash apt-get update curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do sleep 1 ; done apt-get install -y python3-pip unzip jq asterisk nodejs nginx curl \\"https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/arm64/latest/amazon-cloudwatch-agent.deb\\" -o \\"amazon-cloudwatch-agent.deb\\" dpkg -i -E ./amazon-cloudwatch-agent.deb while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do sleep 1 ; done corepack enable mkdir -p /var/lib/asterisk/sounds/en mkdir -p /opt/aws/bin pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz ln -s /root/aws-cfn-bootstrap-latest/init/ubuntu/cfn-hup /etc/init.d/cfn-hup ln -s /usr/local/bin/cfn-* /opt/aws/bin/ curl \\"https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip\\" -o \\"awscliv2.zip\\" unzip -q awscliv2.zip ./aws/install echo AWS CLI installed # fingerprint: d3347e516be61774 ( set +e /opt/aws/bin/cfn-init -v --region ", Object { "Ref": "AWS::Region", }, " --stack ", Object { "Ref": "AWS::StackName", }, " --resource ServerInstanceE518391B3f397fb84abf6f47 --url https://cloudformation.", Object { "Ref": "AWS::Region", }, ".", Object { "Ref": "AWS::URLSuffix", }, " --role ", Object { "Ref": "ServerserverEc2RoleAA905608", }, " -c default /opt/aws/bin/cfn-signal -e $? --region ", Object { "Ref": "AWS::Region", }, " --stack ", Object { "Ref": "AWS::StackName", }, " --resource ServerInstanceE518391B3f397fb84abf6f47 --url https://cloudformation.", Object { "Ref": "AWS::Region", }, ".", Object { "Ref": "AWS::URLSuffix", }, " --role ", Object { "Ref": "ServerserverEc2RoleAA905608", }, " cat /var/log/cfn-init.log >&2 )", ], ], }, }, }, "Type": "AWS::EC2::Instance", }, "ServerInstanceInstanceProfile5CC6E324": Object { "Properties": Object { "Roles": Array [ Object { "Ref": "ServerserverEc2RoleAA905608", }, ], }, "Type": "AWS::IAM::InstanceProfile", }, "Serverec2InstanceSecurityGroupBD9C6329": Object { "Properties": Object { "GroupDescription": "test/Server/ec2InstanceSecurityGroup", "SecurityGroupEgress": Array [ Object { "CidrIp": "0.0.0.0/0", "Description": "Allow all outbound traffic by default", "IpProtocol": "-1", }, ], "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::SecurityGroup", }, "ServerserverEc2RoleAA905608": Object { "Properties": Object { "AssumeRolePolicyDocument": Object { "Statement": Array [ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { "Service": "ec2.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "ManagedPolicyArns": Array [ Object { "Fn::Join": Array [ "", Array [ "arn:", Object { "Ref": "AWS::Partition", }, ":iam::aws:policy/AmazonSSMManagedInstanceCore", ], ], }, ], "Policies": Array [ Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "chime:*", "Effect": "Allow", "Resource": "*", }, ], "Version": "2012-10-17", }, "PolicyName": "chimePolicy", }, Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", "logs:DescribeLogStreams", ], "Effect": "Allow", "Resource": "*", }, ], "Version": "2012-10-17", }, "PolicyName": "cloudwatchLogs", }, Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": "polly:SynthesizeSpeech", "Effect": "Allow", "Resource": "*", }, ], "Version": "2012-10-17", }, "PolicyName": "pollyPolicy", }, ], }, "Type": "AWS::IAM::Role", }, "ServerserverEc2RoleDefaultPolicy2995B49A": Object { "Properties": Object { "PolicyDocument": Object { "Statement": Array [ Object { "Action": Array [ "cloudformation:DescribeStackResource", "cloudformation:SignalResource", ], "Effect": "Allow", "Resource": Object { "Ref": "AWS::StackId", }, }, ], "Version": "2012-10-17", }, "PolicyName": "ServerserverEc2RoleDefaultPolicy2995B49A", "Roles": Array [ Object { "Ref": "ServerserverEc2RoleAA905608", }, ], }, "Type": "AWS::IAM::Policy", }, "VPC61AD6880": Object { "Properties": Object { "CidrBlock": "10.0.0.0/16", "EnableDnsHostnames": true, "EnableDnsSupport": true, "InstanceTenancy": "default", "Tags": Array [ Object { "Key": "Name", "Value": "test/VPC/VPC", }, ], }, "Type": "AWS::EC2::VPC", }, "VPCALBSecurityGroup1223EED0": Object { "Properties": Object { "GroupDescription": "Security Group for ALB", "SecurityGroupEgress": Array [ Object { "CidrIp": "0.0.0.0/0", "Description": "Allow all outbound traffic by default", "IpProtocol": "-1", }, ], "SecurityGroupIngress": Array [ Object { "CidrIp": "0.0.0.0/0", "Description": "from 0.0.0.0/0:80", "FromPort": 80, "IpProtocol": "tcp", "ToPort": 80, }, ], "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::SecurityGroup", }, "VPCApplicationLoadBalancerF3CA31CB": Object { "DependsOn": Array [ "VPCServerPublicSubnet1DefaultRoute0DEC8857", "VPCServerPublicSubnet1RouteTableAssociationBCA9EE21", "VPCServerPublicSubnet2DefaultRoute6A434666", "VPCServerPublicSubnet2RouteTableAssociationE261CDCA", ], "Properties": Object { "LoadBalancerAttributes": Array [ Object { "Key": "deletion_protection.enabled", "Value": "false", }, ], "Scheme": "internet-facing", "SecurityGroups": Array [ Object { "Fn::GetAtt": Array [ "VPCALBSecurityGroup1223EED0", "GroupId", ], }, ], "Subnets": Array [ Object { "Ref": "VPCServerPublicSubnet1SubnetF3987995", }, Object { "Ref": "VPCServerPublicSubnet2SubnetDB508B90", }, ], "Type": "application", }, "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", }, "VPCIGWE1DD60CF": Object { "Properties": Object { "Tags": Array [ Object { "Key": "Name", "Value": "test/VPC/VPC", }, ], }, "Type": "AWS::EC2::InternetGateway", }, "VPCSSHSecurityGroup0495A24F": Object { "Properties": Object { "GroupDescription": "Security Group for SSH", "SecurityGroupEgress": Array [ Object { "CidrIp": "0.0.0.0/0", "Description": "Allow all outbound traffic by default", "IpProtocol": "-1", }, ], "SecurityGroupIngress": Array [ Object { "CidrIp": "0.0.0.0/0", "Description": "from 0.0.0.0/0:22", "FromPort": 22, "IpProtocol": "tcp", "ToPort": 22, }, Object { "CidrIp": "0.0.0.0/0", "Description": "from 0.0.0.0/0:3000", "FromPort": 3000, "IpProtocol": "tcp", "ToPort": 3000, }, Object { "CidrIp": "0.0.0.0/0", "Description": "from 0.0.0.0/0:8088", "FromPort": 8088, "IpProtocol": "tcp", "ToPort": 8088, }, ], "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::SecurityGroup", }, "VPCServerPublicSubnet1DefaultRoute0DEC8857": Object { "DependsOn": Array [ "VPCVPCGW3AFA48F6", ], "Properties": Object { "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": Object { "Ref": "VPCIGWE1DD60CF", }, "RouteTableId": Object { "Ref": "VPCServerPublicSubnet1RouteTable140320E2", }, }, "Type": "AWS::EC2::Route", }, "VPCServerPublicSubnet1RouteTable140320E2": Object { "Properties": Object { "Tags": Array [ Object { "Key": "Name", "Value": "test/VPC/VPC/ServerPublicSubnet1", }, ], "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::RouteTable", }, "VPCServerPublicSubnet1RouteTableAssociationBCA9EE21": Object { "Properties": Object { "RouteTableId": Object { "Ref": "VPCServerPublicSubnet1RouteTable140320E2", }, "SubnetId": Object { "Ref": "VPCServerPublicSubnet1SubnetF3987995", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VPCServerPublicSubnet1SubnetF3987995": Object { "Properties": Object { "AvailabilityZone": Object { "Fn::Select": Array [ 0, Object { "Fn::GetAZs": "", }, ], }, "CidrBlock": "10.0.0.0/24", "MapPublicIpOnLaunch": true, "Tags": Array [ Object { "Key": "aws-cdk:subnet-name", "Value": "ServerPublic", }, Object { "Key": "aws-cdk:subnet-type", "Value": "Public", }, Object { "Key": "Name", "Value": "test/VPC/VPC/ServerPublicSubnet1", }, ], "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::Subnet", }, "VPCServerPublicSubnet2DefaultRoute6A434666": Object { "DependsOn": Array [ "VPCVPCGW3AFA48F6", ], "Properties": Object { "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": Object { "Ref": "VPCIGWE1DD60CF", }, "RouteTableId": Object { "Ref": "VPCServerPublicSubnet2RouteTableD6971BF3", }, }, "Type": "AWS::EC2::Route", }, "VPCServerPublicSubnet2RouteTableAssociationE261CDCA": Object { "Properties": Object { "RouteTableId": Object { "Ref": "VPCServerPublicSubnet2RouteTableD6971BF3", }, "SubnetId": Object { "Ref": "VPCServerPublicSubnet2SubnetDB508B90", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VPCServerPublicSubnet2RouteTableD6971BF3": Object { "Properties": Object { "Tags": Array [ Object { "Key": "Name", "Value": "test/VPC/VPC/ServerPublicSubnet2", }, ], "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::RouteTable", }, "VPCServerPublicSubnet2SubnetDB508B90": Object { "Properties": Object { "AvailabilityZone": Object { "Fn::Select": Array [ 1, Object { "Fn::GetAZs": "", }, ], }, "CidrBlock": "10.0.1.0/24", "MapPublicIpOnLaunch": true, "Tags": Array [ Object { "Key": "aws-cdk:subnet-name", "Value": "ServerPublic", }, Object { "Key": "aws-cdk:subnet-type", "Value": "Public", }, Object { "Key": "Name", "Value": "test/VPC/VPC/ServerPublicSubnet2", }, ], "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::Subnet", }, "VPCServerSecurityGroup0E1BDC27": Object { "Properties": Object { "GroupDescription": "Security Group for Asterisk Instance", "SecurityGroupEgress": Array [ Object { "CidrIp": "0.0.0.0/0", "Description": "Allow all outbound traffic by default", "IpProtocol": "-1", }, ], "SecurityGroupIngress": Array [ Object { "CidrIp": "3.80.16.0/23", "Description": "Allow Chime Voice Connector Signaling Access", "FromPort": 5060, "IpProtocol": "udp", "ToPort": 5060, }, Object { "CidrIp": "3.80.16.0/23", "Description": "Allow Chime Voice Connector Signaling Access", "FromPort": 5060, "IpProtocol": "tcp", "ToPort": 5060, }, Object { "CidrIp": "99.77.253.0/24", "Description": "Allow Chime Voice Connector Signaling Access", "FromPort": 5060, "IpProtocol": "udp", "ToPort": 5060, }, Object { "CidrIp": "99.77.253.0/24", "Description": "Allow Chime Voice Connector Signaling Access", "FromPort": 5060, "IpProtocol": "tcp", "ToPort": 5060, }, Object { "CidrIp": "99.77.253.0/24", "Description": "Allow Chime Voice Connector Signaling Access", "FromPort": 5000, "IpProtocol": "udp", "ToPort": 65000, }, Object { "CidrIp": "3.80.16.0/23", "Description": "Allow Chime Voice Connector Media Access", "FromPort": 5000, "IpProtocol": "udp", "ToPort": 65000, }, Object { "CidrIp": "52.55.62.128/25", "Description": "Allow Chime Voice Connector Media Access", "FromPort": 1024, "IpProtocol": "udp", "ToPort": 65535, }, Object { "CidrIp": "52.55.63.0/25", "Description": "Allow Chime Voice Connector Media Access", "FromPort": 1024, "IpProtocol": "udp", "ToPort": 65535, }, Object { "CidrIp": "34.212.95.128/25", "Description": "Allow Chime Voice Connector Media Access", "FromPort": 1024, "IpProtocol": "udp", "ToPort": 65535, }, Object { "CidrIp": "34.223.21.0/25", "Description": "Allow Chime Voice Connector Media Access", "FromPort": 1024, "IpProtocol": "udp", "ToPort": 65535, }, ], "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::SecurityGroup", }, "VPCVPCGW3AFA48F6": Object { "Properties": Object { "InternetGatewayId": Object { "Ref": "VPCIGWE1DD60CF", }, "VpcId": Object { "Ref": "VPC61AD6880", }, }, "Type": "AWS::EC2::VPCGatewayAttachment", }, "VPCserverEip15B58F30": Object { "Type": "AWS::EC2::EIP", }, }, "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.", }, ], }, }, } `;