Skip to content

sns-sqs-cdk: Update aws-cdk-lib#3121

Open
kakakakakku wants to merge 2 commits into
aws-samples:mainfrom
kakakakakku:sns-sqs-cdk
Open

sns-sqs-cdk: Update aws-cdk-lib#3121
kakakakakku wants to merge 2 commits into
aws-samples:mainfrom
kakakakakku:sns-sqs-cdk

Conversation

@kakakakakku
Copy link
Copy Markdown
Contributor

Issue #, if available:
N/A

Description of changes:
Hi😀 Thanks for the useful patterns!

To keep this pattern maintainable, I updated the aws-cdk-lib.

Check

cdk deploy completed successfully and works good.

$ aws sns publish --topic-arn arn:aws:sns:ap-northeast-1:000000000000:SnsSqsCdkStack-MySnsTopicCB85459E-kpxGsvCIpoiW --subject testSubject --message testMessage
{
    "MessageId": "6078b185-e81b-502f-bc90-d30bbef98020"
}

$ aws sqs receive-message --queue-url https://sqs.ap-northeast-1.amazonaws.com/000000000000/SnsSqsCdkStack-MySqsQueue317E6770-YFVaQxGaouvC
{
    "Messages": [
        {
            "MessageId": "5e2d65f8-7cd3-4a06-8c4b-d38f3b688921",
            "ReceiptHandle": "xxxxx",
            "MD5OfBody": "d8c38f5b66a0dddc2ada0f21416bb5d5",
            "Body": "{\n  \"Type\" : \"Notification\",\n  \"MessageId\" : \"6078b185-e81b-502f-bc90-d30bbef98020\",\n  \"TopicArn\" : \"arn:aws:sns:ap-northeast-1:000000000000:SnsSqsCdkStack-MySnsTopicCB85459E-kpxGsvCIpoiW\",\n  \"Subject\" : \"testSubject\",\n  \"Message\" : \"testMessage\",\n  \"Timestamp\" : \"2026-05-25T13:54:42.333Z\",\n  \"SignatureVersion\" : \"1\",\n  \"Signature\" : \"xxx\",\n  \"SigningCertURL\" : \"https://sns.ap-northeast-1.amazonaws.com/SimpleNotificationService-7506a1e35b36ef5a444dd1a8e7cc3ed8.pem\",\n  \"UnsubscribeURL\" : \"https://sns.ap-northeast-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:ap-northeast-1:000000000000:SnsSqsCdkStack-MySnsTopicCB85459E-kpxGsvCIpoiW:0dd1824f-2361-40fa-b80f-d3f73fcc64ed\"\n}"
        }
    ]
}

Thank you😀


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -1,2 +1,2 @@
aws-cdk-lib==2.13.0
aws-cdk-lib==2.257.0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iam.ServicePrincipal('sns.amazonaws.com')
]
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: add_subscription() automatically adds an equivalent SQS resource policy, so this block is redundant😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants