// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`test Text Analysis Fireshose Stream Creation 1`] = ` { "Parameters": { "AssetParameters8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464ArtifactHash36F616DD": { "Description": "Artifact hash for asset "8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464"", "Type": "String", }, "AssetParameters8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464S3Bucket65363AF3": { "Description": "S3 bucket for asset "8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464"", "Type": "String", }, "AssetParameters8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464S3VersionKey16E8A40A": { "Description": "S3 key for asset version "8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464"", "Type": "String", }, }, "Resources": { "MappingsFirehoseRoleC66C52FA": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "firehose.amazonaws.com", }, }, ], "Version": "2012-10-17", }, }, "Type": "AWS::IAM::Role", }, "MappingsFirehoseRoleDefaultPolicy997DCB56": { "Properties": { "PolicyDocument": { "Statement": [ { "Action": [ "s3:GetObject*", "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", "s3:PutObject*", "s3:Abort*", ], "Effect": "Allow", "Resource": [ { "Fn::GetAtt": [ "mappingsbucket4AF7BD5E", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "mappingsbucket4AF7BD5E", "Arn", ], }, "/*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "MappingsFirehoseRoleDefaultPolicy997DCB56", "Roles": [ { "Ref": "MappingsFirehoseRoleC66C52FA", }, ], }, "Type": "AWS::IAM::Policy", }, "MappingsKinesisFirehose5E0D6FFA": { "DependsOn": [ "MappingsFirehoseRoleDefaultPolicy997DCB56", "MappingsFirehoseRoleC66C52FA", ], "Properties": { "DeliveryStreamEncryptionConfigurationInput": { "KeyType": "AWS_OWNED_CMK", }, "DeliveryStreamType": "DirectPut", "ExtendedS3DestinationConfiguration": { "BucketARN": { "Fn::GetAtt": [ "mappingsbucket4AF7BD5E", "Arn", ], }, "BufferingHints": { "IntervalInSeconds": 600, "SizeInMBs": 128, }, "CloudWatchLoggingOptions": { "Enabled": true, "LogGroupName": { "Ref": "MappingsKinesisFirehosefirehoseloggroupBE9AD2E0", }, "LogStreamName": { "Ref": "MappingsKinesisFirehosefirehoseloggroupfirehoselogstreamD2508995", }, }, "CompressionFormat": "UNCOMPRESSED", "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":kms:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":alias/aws/s3", ], ], }, }, }, "Prefix": "/mappings", "RoleARN": { "Fn::GetAtt": [ "MappingsFirehoseRoleC66C52FA", "Arn", ], }, }, }, "Type": "AWS::KinesisFirehose::DeliveryStream", }, "MappingsKinesisFirehoseKinesisFirehosePolicy68E53706": { "Properties": { "PolicyDocument": { "Statement": [ { "Action": [ "s3:AbortMultipartUpload", "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket", "s3:ListBucketMultipartUploads", "s3:PutObject", ], "Effect": "Allow", "Resource": [ { "Fn::GetAtt": [ "mappingsbucket4AF7BD5E", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "mappingsbucket4AF7BD5E", "Arn", ], }, "/*", ], ], }, ], }, { "Action": "logs:PutLogEvents", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":logs:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":log-group:", { "Ref": "MappingsKinesisFirehosefirehoseloggroupBE9AD2E0", }, ":log-stream:", { "Ref": "MappingsKinesisFirehosefirehoseloggroupfirehoselogstreamD2508995", }, ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "MappingsKinesisFirehoseKinesisFirehosePolicy68E53706", "Roles": [ { "Ref": "MappingsKinesisFirehoseKinesisFirehoseRole4C9908D7", }, ], }, "Type": "AWS::IAM::Policy", }, "MappingsKinesisFirehoseKinesisFirehoseRole4C9908D7": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "firehose.amazonaws.com", }, }, ], "Version": "2012-10-17", }, }, "Type": "AWS::IAM::Role", }, "MappingsKinesisFirehosefirehoseloggroupBE9AD2E0": { "DeletionPolicy": "Retain", "Metadata": { "cfn_nag": { "rules_to_suppress": [ { "id": "W86", "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely", }, { "id": "W84", "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)", }, ], }, }, "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, "MappingsKinesisFirehosefirehoseloggroupfirehoselogstreamD2508995": { "DeletionPolicy": "Retain", "Properties": { "LogGroupName": { "Ref": "MappingsKinesisFirehosefirehoseloggroupBE9AD2E0", }, }, "Type": "AWS::Logs::LogStream", "UpdateReplacePolicy": "Retain", }, "TestTAProxyLambdaFunction646B9726": { "DependsOn": [ "TestTAProxyLambdaFunctionServiceRoleDefaultPolicyFC7C1A09", "TestTAProxyLambdaFunctionServiceRole1AE0D1E2", ], "Metadata": { "cfn_nag": { "rules_to_suppress": [ { "id": "W58", "reason": "Lambda functions has the required permission to write CloudWatch Logs. It uses custom policy instead of arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole with tighter permissions.", }, { "id": "W89", "reason": "This is not a rule for the general case, just for specific use cases/industries", }, { "id": "W92", "reason": "Impossible for us to define the correct concurrency for clients", }, ], }, }, "Properties": { "Code": { "S3Bucket": { "Ref": "AssetParameters8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464S3Bucket65363AF3", }, "S3Key": { "Fn::Join": [ "", [ { "Fn::Select": [ 0, { "Fn::Split": [ "||", { "Ref": "AssetParameters8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464S3VersionKey16E8A40A", }, ], }, ], }, { "Fn::Select": [ 1, { "Fn::Split": [ "||", { "Ref": "AssetParameters8b91b6e5006db6d50421e4fb40dd5c646cdf2af765de93fc5072c7026fcbf464S3VersionKey16E8A40A", }, ], }, ], }, ], ], }, }, "Environment": { "Variables": { "TOPICS_FIREHOSE": { "Ref": "TopicKinesisFirehose8F663708", }, "TOPICS_NS": "com.analyze.inference.mapping", "TOPIC_MAPPINGS_FIREHOSE": { "Ref": "MappingsKinesisFirehose5E0D6FFA", }, "TOPIC_MAPPINGS_NS": "com.analyze.inferece.topic", }, }, "Handler": "lambda_function.handler", "MemorySize": 256, "Role": { "Fn::GetAtt": [ "TestTAProxyLambdaFunctionServiceRole1AE0D1E2", "Arn", ], }, "Runtime": "python3.8", "Timeout": 600, "TracingConfig": { "Mode": "Active", }, }, "Type": "AWS::Lambda::Function", }, "TestTAProxyLambdaFunctionServiceRole1AE0D1E2": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com", }, }, ], "Version": "2012-10-17", }, "Policies": [ { "PolicyDocument": { "Statement": [ { "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents", ], "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":logs:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":log-group:/aws/lambda/*", ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "LambdaFunctionServiceRolePolicy", }, ], }, "Type": "AWS::IAM::Role", }, "TestTAProxyLambdaFunctionServiceRoleDefaultPolicyFC7C1A09": { "Metadata": { "cfn_nag": { "rules_to_suppress": [ { "id": "W12", "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC.", }, ], }, }, "Properties": { "PolicyDocument": { "Statement": [ { "Action": [ "xray:PutTraceSegments", "xray:PutTelemetryRecords", ], "Effect": "Allow", "Resource": "*", }, { "Action": [ "firehose:PutRecord", "firehose:PutRecordBatch", ], "Effect": "Allow", "Resource": [ { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":firehose:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":deliverystream/", { "Ref": "TopicKinesisFirehose8F663708", }, ], ], }, { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":firehose:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":deliverystream/", { "Ref": "MappingsKinesisFirehose5E0D6FFA", }, ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "TestTAProxyLambdaFunctionServiceRoleDefaultPolicyFC7C1A09", "Roles": [ { "Ref": "TestTAProxyLambdaFunctionServiceRole1AE0D1E2", }, ], }, "Type": "AWS::IAM::Policy", }, "TopicFirehoseRoleCE52DEAF": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "firehose.amazonaws.com", }, }, ], "Version": "2012-10-17", }, }, "Type": "AWS::IAM::Role", }, "TopicFirehoseRoleDefaultPolicyD8DD6E87": { "Properties": { "PolicyDocument": { "Statement": [ { "Action": [ "s3:GetObject*", "s3:GetBucket*", "s3:List*", "s3:DeleteObject*", "s3:PutObject*", "s3:Abort*", ], "Effect": "Allow", "Resource": [ { "Fn::GetAtt": [ "topics8661C816", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "topics8661C816", "Arn", ], }, "/*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "TopicFirehoseRoleDefaultPolicyD8DD6E87", "Roles": [ { "Ref": "TopicFirehoseRoleCE52DEAF", }, ], }, "Type": "AWS::IAM::Policy", }, "TopicKinesisFirehose8F663708": { "DependsOn": [ "TopicFirehoseRoleDefaultPolicyD8DD6E87", "TopicFirehoseRoleCE52DEAF", ], "Properties": { "DeliveryStreamEncryptionConfigurationInput": { "KeyType": "AWS_OWNED_CMK", }, "DeliveryStreamType": "DirectPut", "ExtendedS3DestinationConfiguration": { "BucketARN": { "Fn::GetAtt": [ "topics8661C816", "Arn", ], }, "BufferingHints": { "IntervalInSeconds": 600, "SizeInMBs": 128, }, "CloudWatchLoggingOptions": { "Enabled": true, "LogGroupName": { "Ref": "TopicKinesisFirehosefirehoseloggroupAA816077", }, "LogStreamName": { "Ref": "TopicKinesisFirehosefirehoseloggroupfirehoselogstreamB6B49275", }, }, "CompressionFormat": "UNCOMPRESSED", "EncryptionConfiguration": { "KMSEncryptionConfig": { "AWSKMSKeyARN": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":kms:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":alias/aws/s3", ], ], }, }, }, "Prefix": "/topic", "RoleARN": { "Fn::GetAtt": [ "TopicFirehoseRoleCE52DEAF", "Arn", ], }, }, }, "Type": "AWS::KinesisFirehose::DeliveryStream", }, "TopicKinesisFirehoseKinesisFirehosePolicyEC75E12A": { "Properties": { "PolicyDocument": { "Statement": [ { "Action": [ "s3:AbortMultipartUpload", "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket", "s3:ListBucketMultipartUploads", "s3:PutObject", ], "Effect": "Allow", "Resource": [ { "Fn::GetAtt": [ "topics8661C816", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "topics8661C816", "Arn", ], }, "/*", ], ], }, ], }, { "Action": "logs:PutLogEvents", "Effect": "Allow", "Resource": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition", }, ":logs:", { "Ref": "AWS::Region", }, ":", { "Ref": "AWS::AccountId", }, ":log-group:", { "Ref": "TopicKinesisFirehosefirehoseloggroupAA816077", }, ":log-stream:", { "Ref": "TopicKinesisFirehosefirehoseloggroupfirehoselogstreamB6B49275", }, ], ], }, }, ], "Version": "2012-10-17", }, "PolicyName": "TopicKinesisFirehoseKinesisFirehosePolicyEC75E12A", "Roles": [ { "Ref": "TopicKinesisFirehoseKinesisFirehoseRoleA113EEB3", }, ], }, "Type": "AWS::IAM::Policy", }, "TopicKinesisFirehoseKinesisFirehoseRoleA113EEB3": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "firehose.amazonaws.com", }, }, ], "Version": "2012-10-17", }, }, "Type": "AWS::IAM::Role", }, "TopicKinesisFirehosefirehoseloggroupAA816077": { "DeletionPolicy": "Retain", "Metadata": { "cfn_nag": { "rules_to_suppress": [ { "id": "W86", "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely", }, { "id": "W84", "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)", }, ], }, }, "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", }, "TopicKinesisFirehosefirehoseloggroupfirehoselogstreamB6B49275": { "DeletionPolicy": "Retain", "Properties": { "LogGroupName": { "Ref": "TopicKinesisFirehosefirehoseloggroupAA816077", }, }, "Type": "AWS::Logs::LogStream", "UpdateReplacePolicy": "Retain", }, "mappingsbucket4AF7BD5E": { "DeletionPolicy": "Retain", "Properties": { "BucketEncryption": { "ServerSideEncryptionConfiguration": [ { "ServerSideEncryptionByDefault": { "SSEAlgorithm": "AES256", }, }, ], }, }, "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Retain", }, "topics8661C816": { "DeletionPolicy": "Retain", "Properties": { "BucketEncryption": { "ServerSideEncryptionConfiguration": [ { "ServerSideEncryptionByDefault": { "SSEAlgorithm": "AES256", }, }, ], }, }, "Type": "AWS::S3::Bucket", "UpdateReplacePolicy": "Retain", }, }, } `;