Skip to content

Commit

Permalink
feat(sns): delivery status logging configuration (aws#28433)
Browse files Browse the repository at this point in the history
Recently Amazon SNS supports configuring delivery status logging with AWS CloudFormation.
https://aws.amazon.com/about-aws/whats-new/2023/12/amazon-sns-configuring-delivery-status-logging-aws-cloudformation/?nc1=h_ls

This is also configurable via L1 CfnTopic construct.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sns.CfnTopic.html

This PR introduces the feature to add delivery status logging configuration via L2 Topic construct.
Closes aws#21971

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
tam0ri authored and paulhcsun committed Jan 5, 2024
1 parent 22e0659 commit 15e2ae9
Show file tree
Hide file tree
Showing 10 changed files with 523 additions and 34 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@
"MyTopic86869434": {
"Type": "AWS::SNS::Topic",
"Properties": {
"DeliveryStatusLogging": [
{
"FailureFeedbackRoleArn": {
"Fn::GetAtt": [
"FeedbackRoleCAF84E5C",
"Arn"
]
},
"Protocol": "http/s",
"SuccessFeedbackRoleArn": {
"Fn::GetAtt": [
"FeedbackRoleCAF84E5C",
"Arn"
]
},
"SuccessFeedbackSampleRate": "50"
}
],
"DisplayName": "fooDisplayName",
"KmsMasterKeyId": {
"Fn::GetAtt": [
Expand All @@ -47,6 +65,51 @@
},
"TopicName": "fooTopic"
}
},
"FeedbackRoleCAF84E5C": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "sns.amazonaws.com"
}
}
],
"Version": "2012-10-17"
}
}
},
"Policy23B91518": {
"Type": "AWS::IAM::ManagedPolicy",
"Properties": {
"Description": "",
"Path": "/",
"PolicyDocument": {
"Statement": [
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:PutMetricFilter",
"logs:PutRetentionPolicy"
],
"Effect": "Allow",
"Resource": "*"
}
],
"Version": "2012-10-17"
},
"Roles": [
{
"Ref": "FeedbackRoleCAF84E5C"
}
]
}
}
},
"Parameters": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 15e2ae9

Please sign in to comment.