@aws-solutions-constructs/aws-events-rule-sns
Version:
CDK Constructs for deploying AWS Events Rule that invokes AWS SNS
226 lines • 5.98 kB
JSON
{
"Resources": {
"testtestWEncryptionKeyC6B126B6": {
"Type": "AWS::KMS::Key",
"Properties": {
"KeyPolicy": {
"Statement": [
{
"Action": "kms:*",
"Effect": "Allow",
"Principal": {
"AWS": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::",
{
"Ref": "AWS::AccountId"
},
":root"
]
]
}
},
"Resource": "*"
},
{
"Action": [
"kms:Decrypt",
"kms:Encrypt",
"kms:ReEncrypt*",
"kms:GenerateDataKey*"
],
"Effect": "Allow",
"Principal": {
"Service": "events.amazonaws.com"
},
"Resource": "*"
}
],
"Version": "2012-10-17"
},
"EnableKeyRotation": true
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"testtestWSnsTopicBFF33C41": {
"Type": "AWS::SNS::Topic",
"Properties": {
"KmsMasterKeyId": {
"Fn::GetAtt": [
"testtestWEncryptionKeyC6B126B6",
"Arn"
]
}
}
},
"testtestWSnsTopicPolicy2A17B1B5": {
"Type": "AWS::SNS::TopicPolicy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": [
"SNS:Publish",
"SNS:RemovePermission",
"SNS:SetTopicAttributes",
"SNS:DeleteTopic",
"SNS:ListSubscriptionsByTopic",
"SNS:GetTopicAttributes",
"SNS:Receive",
"SNS:AddPermission",
"SNS:Subscribe"
],
"Condition": {
"StringEquals": {
"AWS:SourceOwner": {
"Ref": "AWS::AccountId"
}
}
},
"Effect": "Allow",
"Principal": {
"AWS": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::",
{
"Ref": "AWS::AccountId"
},
":root"
]
]
}
},
"Resource": {
"Ref": "testtestWSnsTopicBFF33C41"
},
"Sid": "TopicOwnerOnlyAccess"
},
{
"Action": [
"SNS:Publish",
"SNS:RemovePermission",
"SNS:SetTopicAttributes",
"SNS:DeleteTopic",
"SNS:ListSubscriptionsByTopic",
"SNS:GetTopicAttributes",
"SNS:Receive",
"SNS:AddPermission",
"SNS:Subscribe"
],
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
},
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Resource": {
"Ref": "testtestWSnsTopicBFF33C41"
},
"Sid": "HttpsOnly"
},
{
"Action": "sns:Publish",
"Effect": "Allow",
"Principal": {
"Service": "events.amazonaws.com"
},
"Resource": {
"Ref": "testtestWSnsTopicBFF33C41"
},
"Sid": "2"
}
],
"Version": "2012-10-17"
},
"Topics": [
{
"Ref": "testtestWSnsTopicBFF33C41"
}
]
}
},
"testtestWtest35497CE7": {
"Type": "AWS::Events::EventBus",
"Properties": {
"Name": "test"
}
},
"testtestWEventsRuleDF9938A8": {
"Type": "AWS::Events::Rule",
"Properties": {
"EventBusName": {
"Ref": "testtestWtest35497CE7"
},
"EventPattern": {
"source": [
"solutionsconstructs"
]
},
"State": "ENABLED",
"Targets": [
{
"Arn": {
"Ref": "testtestWSnsTopicBFF33C41"
},
"Id": {
"Fn::GetAtt": [
"testtestWSnsTopicBFF33C41",
"TopicName"
]
}
}
]
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}