// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`IoT Device Simulator ConsoleConstruct Test 1`] = ` { "Resources": { "TestCommonResourceDistributionCloudFrontDistributionCF3F0A1C": { "Metadata": { "cfn_nag": { "rules_to_suppress": [ { "id": "W70", "reason": "Since the distribution uses the CloudFront domain name, CloudFront automatically sets the security policy to TLSv1 regardless of the value of MinimumProtocolVersion", }, ], }, }, "Properties": { "DistributionConfig": { "Comment": "IoT Device Simulator Distribution", "CustomErrorResponses": [ { "ErrorCode": 403, "ResponseCode": 200, "ResponsePagePath": "/index.html", }, { "ErrorCode": 404, "ResponseCode": 200, "ResponsePagePath": "/index.html", }, ], "DefaultCacheBehavior": { "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", "Compress": true, "TargetOriginId": "TestCommonResourceDistributionCloudFrontDistributionOrigin17ECA9ED9", "ViewerProtocolPolicy": "redirect-to-https", }, "DefaultRootObject": "index.html", "Enabled": true, "HttpVersion": "http2", "IPV6Enabled": true, "Logging": { "Bucket": { "Fn::GetAtt": [ "testBucketDF4D7D1A", "RegionalDomainName", ], }, "Prefix": "console-cf/", }, "Origins": [ { "DomainName": { "Fn::GetAtt": [ "TestCommonResourceDistributionS3Bucket4473F8A7", "RegionalDomainName", ], }, "Id": "TestCommonResourceDistributionCloudFrontDistributionOrigin17ECA9ED9", "S3OriginConfig": { "OriginAccessIdentity": { "Fn::Join": [ "", [ "origin-access-identity/cloudfront/", { "Ref": "TestCommonResourceDistributionCloudFrontDistributionOrigin1S3Origin537D11B7", }, ], ], }, }, }, ], }, }, "Type": "AWS::CloudFront::Distribution", }, "TestCommonResourceDistributionCloudFrontDistributionOrigin1S3Origin537D11B7": { "Properties": { "CloudFrontOriginAccessIdentityConfig": { "Comment": "Identity for TestCommonResourceDistributionCloudFrontDistributionOrigin17ECA9ED9", }, }, "Type": "AWS::CloudFront::CloudFrontOriginAccessIdentity", }, "TestCommonResourceDistributionS3Bucket4473F8A7": { "DeletionPolicy": "Retain", "Properties": { "BucketEncryption": { "ServerSideEncryptionConfiguration": [ { "ServerSideEncryptionByDefault": { "SSEAlgorithm": "AES256", }, }, ], }, "LifecycleConfiguration": { "Rules": [ { "NoncurrentVersionTransitions": [ { "StorageClass": "GLACIER", "TransitionInDays": 90, }, ], "Status": "Enabled", }, ], }, "LoggingConfiguration": { "DestinationBucketName": { "Ref": "testBucketDF4D7D1A", }, "LogFilePrefix": "console-s3/", }, "PublicAccessBlockConfiguration": { "BlockPublicAcls": true, "BlockPublicPolicy": true, "IgnorePublicAcls": true, "RestrictPublicBuckets": true, }, "VersioningConfiguration": { "Status": "Enabled", }, }, "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Retain", }, "TestCommonResourceDistributionS3BucketPolicyFD5D32C0": { "Metadata": { "cfn_nag": { "rules_to_suppress": [ { "id": "F16", "reason": "Public website bucket policy requires a wildcard principal", }, ], }, }, "Properties": { "Bucket": { "Ref": "TestCommonResourceDistributionS3Bucket4473F8A7", }, "PolicyDocument": { "Statement": [ { "Action": "s3:*", "Condition": { "Bool": { "aws:SecureTransport": "false", }, }, "Effect": "Deny", "Principal": { "AWS": "*", }, "Resource": [ { "Fn::GetAtt": [ "TestCommonResourceDistributionS3Bucket4473F8A7", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "TestCommonResourceDistributionS3Bucket4473F8A7", "Arn", ], }, "/*", ], ], }, ], }, { "Action": "s3:GetObject", "Effect": "Allow", "Principal": { "CanonicalUser": { "Fn::GetAtt": [ "TestCommonResourceDistributionCloudFrontDistributionOrigin1S3Origin537D11B7", "S3CanonicalUserId", ], }, }, "Resource": { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "TestCommonResourceDistributionS3Bucket4473F8A7", "Arn", ], }, "/*", ], ], }, }, ], "Version": "2012-10-17", }, }, "Type": "AWS::S3::BucketPolicy", }, "TestCommonResourceIDSIoTPolicyB2F77C27": { "Metadata": { "cfn_nag": { "rules_to_suppress": [ { "id": "W11", "reason": "Cannot specify the resource to attach policy to identity.", }, ], }, }, "Properties": { "PolicyDocument": { "Statement": [ { "Action": "iot:Connect", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":iot:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":client/*", ], ], }, }, { "Action": "iot:Subscribe", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":iot:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":topicfilter/*", ], ], }, }, { "Action": "iot:Receive", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":iot:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":topic/*", ], ], }, }, ], "Version": "2012-10-17", }, }, "Type": "AWS::IoT::Policy", }, "TestCommonResourceIdentityPoolAuthenticatedRoleB174B008": { "Metadata": { "cfn_nag": { "rules_to_suppress": [ { "id": "W11", "reason": "iot:AttachPrincipalPolicy does not allow for resource specification", }, ], }, }, "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "ForAnyValue:StringLike": { "cognito-identity.amazonaws.com:amr": "authenticated", }, "StringEquals": { "cognito-identity.amazonaws.com:aud": { "Ref": "TestCommonResourceIdentityPoolFC1CEC73", }, }, }, "Effect": "Allow", "Principal": { "Federated": "cognito-identity.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Description": { "Fn::Join": [ "", [ { "Ref": "AWS::StackName", }, " Identity Pool authenticated role", ], ], }, "Policies": [ { "PolicyDocument": { "Statement": [ { "Action": "execute-api:Invoke", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":execute-api:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":12ab34cde5/prod/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "ExecuteApiPolicy", }, { "PolicyDocument": { "Statement": [ { "Action": [ "geo:SearchPlaceIndexForText", "geo:GetMapGlyphs", "geo:GetMapSprites", "geo:GetMapStyleDescriptor", "geo:SearchPlaceIndexForPosition", "execute-api:Invoke", "geo:GetMapTile", ], "Effect": "Allow", "Resource": [ "arn:aws:geo:region:accountID:map/ExampleMap", "arn:aws:geo:region:accountID:place-index/ExamplePlaceIndex", ], }, ], "Version": "2012-10-17", }, "PolicyName": "LocationServicePolicy", }, { "PolicyDocument": { "Statement": [ { "Action": "iot:AttachPrincipalPolicy", "Effect": "Allow", "Resource": "*", }, { "Action": "iot:Connect", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":iot:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":client/*", ], ], }, }, { "Action": "iot:Subscribe", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":iot:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":topicfilter/*", ], ], }, }, { "Action": "iot:Receive", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":iot:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":topic/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "IoTPolicy", }, ], }, "Type": "AWS::IAM::Role", }, "TestCommonResourceIdentityPoolFC1CEC73": { "Properties": { "AllowUnauthenticatedIdentities": false, "CognitoIdentityProviders": [ { "ClientId": { "Ref": "TestCommonResourceUserPoolClient2595A2FD", }, "ProviderName": { "Fn::GetAtt": [ "TestCommonResourceUserPoolAAE3EB23", "ProviderName", ], }, "ServerSideTokenCheck": false, }, ], }, "Type": "AWS::Cognito::IdentityPool", }, "TestCommonResourceIdentityPoolRoleAttachement3832B688": { "Properties": { "IdentityPoolId": { "Ref": "TestCommonResourceIdentityPoolFC1CEC73", }, "Roles": { "authenticated": { "Fn::GetAtt": [ "TestCommonResourceIdentityPoolAuthenticatedRoleB174B008", "Arn", ], }, }, }, "Type": "AWS::Cognito::IdentityPoolRoleAttachment", }, "TestCommonResourceUserEE889C83": { "Properties": { "DesiredDeliveryMediums": [ "EMAIL", ], "ForceAliasCreation": true, "UserAttributes": [ { "Name": "email", "Value": "someEmail", }, { "Name": "email_verified", "Value": "true", }, ], "UserPoolId": { "Ref": "TestCommonResourceUserPoolAAE3EB23", }, "Username": "someEmail", }, "Type": "AWS::Cognito::UserPoolUser", }, "TestCommonResourceUserPoolAAE3EB23": { "DeletionPolicy": "Delete", "Properties": { "AccountRecoverySetting": { "RecoveryMechanisms": [ { "Name": "verified_phone_number", "Priority": 1, }, { "Name": "verified_email", "Priority": 2, }, ], }, "AdminCreateUserConfig": { "AllowAdminCreateUserOnly": true, "InviteMessageTemplate": { "EmailMessage": { "Fn::Join": [ "", [ " <p> You are invited to join IoT Device Simulator.<br /> https://", { "Fn::GetAtt": [ "TestCommonResourceDistributionCloudFrontDistributionCF3F0A1C", "DomainName", ], }, " </p> <p> Please sign in to IoT Device Simulator using the temporary credentials below:<br /> Username: <strong>{username}</strong><br />Password: <strong>{####}</strong> </p> ", ], ], }, "EmailSubject": "[IoT Device Simulator] Login information", }, }, "AutoVerifiedAttributes": [ "email", ], "EmailVerificationMessage": "The verification code to your new account is {####}", "EmailVerificationSubject": "Verify your new account", "Policies": { "PasswordPolicy": { "MinimumLength": 12, "RequireLowercase": true, "RequireNumbers": true, "RequireSymbols": true, "RequireUppercase": true, }, }, "SmsVerificationMessage": "The verification code to your new account is {####}", "UserPoolAddOns": { "AdvancedSecurityMode": "ENFORCED", }, "UserPoolName": { "Fn::Join": [ "", [ { "Ref": "AWS::StackName", }, "-user-pool", ], ], }, "UsernameAttributes": [ "email", ], "VerificationMessageTemplate": { "DefaultEmailOption": "CONFIRM_WITH_CODE", "EmailMessage": "The verification code to your new account is {####}", "EmailSubject": "Verify your new account", "SmsMessage": "The verification code to your new account is {####}", }, }, "Type": "AWS::Cognito::UserPool", "UpdateReplacePolicy": "Delete", }, "TestCommonResourceUserPoolClient2595A2FD": { "Properties": { "AllowedOAuthFlows": [ "implicit", "code", ], "AllowedOAuthFlowsUserPoolClient": true, "AllowedOAuthScopes": [ "profile", "phone", "email", "openid", "aws.cognito.signin.user.admin", ], "CallbackURLs": [ "https://example.com", ], "ClientName": { "Fn::Join": [ "", [ { "Ref": "AWS::StackName", }, "-userpool-client", ], ], }, "GenerateSecret": false, "PreventUserExistenceErrors": "ENABLED", "RefreshTokenValidity": 1440, "SupportedIdentityProviders": [ "COGNITO", ], "TokenValidityUnits": { "RefreshToken": "minutes", }, "UserPoolId": { "Ref": "TestCommonResourceUserPoolAAE3EB23", }, }, "Type": "AWS::Cognito::UserPoolClient", }, "testBucketDF4D7D1A": { "DeletionPolicy": "Retain", "Properties": { "AccessControl": "LogDeliveryWrite", }, "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Retain", }, }, } `;