You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: APIGateway-SQS-ReceiveMessages/README.md
+36-17Lines changed: 36 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
## AWS API Gateway to AWS SQS
2
2
3
3
This pattern creates a REST API Gateway that directly integrates with AWS SQS to read messages.
4
-
Learn more about this pattern at Serverless Land Patterns: << Add the live URL here >>
5
-
Important: This application uses various AWS services that incur costs beyond the Free Tier usage. Please review 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.
4
+
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/
5
+
6
+
**Important**: This application uses various AWS services that incur costs beyond the Free Tier usage. Please review 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.
6
7
7
8
## Requirements
8
9
@@ -15,50 +16,63 @@ Important: This application uses various AWS services that incur costs beyond th
- Allow SAM CLI to create IAM roles with required permissions
26
-
- After initial deployment with sam deploy --guided, subsequent deployments can use sam deploy with the saved configuration (samconfig.toml).
27
-
- Note the outputs from the deployment process, as they contain resource names and/or ARNs needed for testing.
30
+
31
+
After initial deployment with sam deploy --guided, subsequent deployments can use sam deploy with the saved configuration (samconfig.toml).
32
+
33
+
Note the outputs from the deployment process, as they contain resource names and/or ARNs needed for testing.
28
34
29
35
## How it works
30
36
31
37
This pattern creates an Amazon API Gateway REST API endpoint that directly connects to Amazon SQS using service integrations. Users can retrieve messages by calling the GET method of the invoke URL (API Gateway) provided in the Stack Output.
38
+
32
39
The invoke URL supports query string parameters such as MaxNumberOfMessages=5, VisibilityTimeout=15, and AttributeName=All to customize the response.
40
+
33
41
For detailed parameter definitions, refer to the [AWS API Reference Documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html).
34
42
35
43
## Usage Example and Consideration
36
44
37
45
This pattern is ideal for scenarios where you need to retrieve messages from SQS via HTTPS without using AWS SDK. Common use cases include:
38
-
Web applications that need to poll SQS queues for new messages, Mobile applications requiring secure access to SQS messages, Third-party integrations where direct AWS SDK access isn't practical, Microservices architectures where services need to read messages over HTTP/HTTPS, Legacy system integrations that support only HTTP/HTTPS protocols, Development environments where simplified queue access is preferred
46
+
Web applications that need to poll SQS queues for new messages, Mobile applications requiring secure access to SQS messages, Third-party integrations where direct AWS SDK access isn't practical, Legacy system integrations that support only HTTP/HTTPS protocols, Development environments where simplified queue access is preferred.
47
+
39
48
Please review [API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html) and [SQS Quotas](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-quotas.html) for service limits before implementation.
40
49
41
50
## Testing
42
51
43
52
Follow these steps to test the integration:
53
+
44
54
1. First, send test messages to the queue:
45
-
```chmod +x send_message_to_queue.sh```
46
-
```./send_message_to_queue.sh {queueURL} {number of messages}```
55
+
```chmod +x send_message_to_queue.sh```
56
+
```./send_message_to_queue.sh {queueURL} {number of messages}```
0 commit comments