Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions sns-sqs-terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
```
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.

Image


## Cleanup

Expand Down
4 changes: 2 additions & 2 deletions sns-sqs-terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
version = "~> 6.0"
}
}

Expand Down Expand Up @@ -72,4 +72,4 @@ output "sns_topic_name" {
}
output "sns_topic_arn" {
value = aws_sns_topic.sns_sqs_demo_topic.arn
}
}