From f6a157ffb72222b213f15c7a67f5ea39ecd1dbfa Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Mon, 18 May 2026 17:25:01 +0900 Subject: [PATCH 1/2] sns-sqs-terraform: Update AWS Provider to v6 --- sns-sqs-terraform/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sns-sqs-terraform/main.tf b/sns-sqs-terraform/main.tf index 2e4930489d..ad1fadb57d 100644 --- a/sns-sqs-terraform/main.tf +++ b/sns-sqs-terraform/main.tf @@ -5,7 +5,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "~> 4.0" + version = "~> 6.0" } } @@ -72,4 +72,4 @@ output "sns_topic_name" { } output "sns_topic_arn" { value = aws_sns_topic.sns_sqs_demo_topic.arn -} \ No newline at end of file +} From 369b2500058ff882c9a408609121c50cb0b1d803 Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Mon, 18 May 2026 17:27:08 +0900 Subject: [PATCH 2/2] sns-sqs-terraform: Fix README --- sns-sqs-terraform/README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sns-sqs-terraform/README.md b/sns-sqs-terraform/README.md index d68e1716c1..ee8fd19024 100644 --- a/sns-sqs-terraform/README.md +++ b/sns-sqs-terraform/README.md @@ -2,7 +2,7 @@ The Terraform stack deploys a SNS topic and an SQS queue. The SQS queue is subscribed to the SNS topic. SNS invokes the SQS queue when new messages are available. When messages are sent to the SNS topic, they are delivered as a JSON event payload to the SQS queue. -Learn more about this pattern at Serverless Land Patterns: [serverlessland.com/patterns/sqs-lambda-terraform](https://serverlessland.com/patterns/sns-sqs-terraform) +Learn more about this pattern at Serverless Land Patterns: [serverlessland.com/patterns/sns-sqs-terraform](https://serverlessland.com/patterns/sns-sqs-terraform) Important: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the [AWS Pricing page](https://aws.amazon.com/pricing/) for details. You are responsible for any AWS costs incurred. No warranty is implied in this example. @@ -58,14 +58,13 @@ When a message is received by the SNS topic, the message is sent to the SQS queu Use the [AWS CLI](https://aws.amazon.com/cli/) to send a message to the SNS topic and observe the message received by SQS (using values from Terraform output): 1. Send a message to SNS: -```bash -aws sns publish --topic-arn ENTER_YOUR_SNS_TOPIC_ARN --subject testSubject --message testMessage -``` + ```bash + aws sns publish --topic-arn ENTER_YOUR_SNS_TOPIC_ARN --subject testSubject --message testMessage + ``` 1. Retrieve the message from SQS queue: -```bash -aws sqs receive-message --queue-url ENTER_YOUR_SQS_QUEUE_URL -``` - + ```bash + aws sqs receive-message --queue-url ENTER_YOUR_SQS_QUEUE_URL + ``` ## Cleanup