// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`test Event Rule Construct 1`] = ` { "Parameters": { "AssetParameterse13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788ArtifactHashE238682D": { "Description": "Artifact hash for asset "e13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788"", "Type": "String", }, "AssetParameterse13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788S3BucketF001991A": { "Description": "S3 bucket for asset "e13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788"", "Type": "String", }, "AssetParameterse13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788S3VersionKey2141A5EF": { "Description": "S3 key for asset version "e13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788"", "Type": "String", }, }, "Resources": { "EventRuleEventRule0AllowEventRuleLambdaFunction73CE9FCC": { "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ "LambdaFunctionBF21E41F", "Arn", ], }, "Principal": "events.amazonaws.com", "SourceArn": { "Fn::GetAtt": [ "EventRuleEventRule0FC2BB61D", "Arn", ], }, }, "Type": "AWS::Lambda::Permission", }, "EventRuleEventRule0FC2BB61D": { "Properties": { "EventBusName": { "Ref": "EventRuleInferenceEventsB6AAA802", }, "EventPattern": { "account": [ { "Ref": "AWS::AccountId", }, ], "region": [ { "Ref": "AWS::Region", }, ], "source": [ "com.test", ], }, "State": "ENABLED", "Targets": [ { "Arn": { "Fn::GetAtt": [ "LambdaFunctionBF21E41F", "Arn", ], }, "Id": "Target0", }, ], }, "Type": "AWS::Events::Rule", }, "EventRuleInferenceEventsB6AAA802": { "Properties": { "Name": "Default-AppIntegration", }, "Type": "AWS::Events::EventBus", }, "LambdaFunctionBF21E41F": { "DependsOn": [ "LambdaFunctionServiceRoleDefaultPolicy126C8897", "LambdaFunctionServiceRole0C4CDE0B", ], "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": "AssetParameterse13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788S3BucketF001991A", }, "S3Key": { "Fn::Join": [ "", [ { "Fn::Select": [ 0, { "Fn::Split": [ "||", { "Ref": "AssetParameterse13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788S3VersionKey2141A5EF", }, ], }, ], }, { "Fn::Select": [ 1, { "Fn::Split": [ "||", { "Ref": "AssetParameterse13192967c38e717b33f5fa0db27137bc08d58a023aea6dc64f5bd76c9fbe788S3VersionKey2141A5EF", }, ], }, ], }, ], ], }, }, "Environment": { "Variables": { "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STREAM_NAME": "test-stream", }, }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ "LambdaFunctionServiceRole0C4CDE0B", "Arn", ], }, "Runtime": "nodejs14.x", "TracingConfig": { "Mode": "Active", }, }, "Type": "AWS::Lambda::Function", }, "LambdaFunctionServiceRole0C4CDE0B": { "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", }, "LambdaFunctionServiceRoleDefaultPolicy126C8897": { "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": "*", }, ], "Version": "2012-10-17", }, "PolicyName": "LambdaFunctionServiceRoleDefaultPolicy126C8897", "Roles": [ { "Ref": "LambdaFunctionServiceRole0C4CDE0B", }, ], }, "Type": "AWS::IAM::Policy", }, }, } `;