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: apigw-lambda-sns/Readme.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,22 @@
2
2
3
3
The SAM template deploys a API Gateway REST API with Lambda function integration, an SNS topic and the IAM permissions required to run the application. Whenever the REST API is invoked, the Lambda function publishes a message to the SNS topic. The AWS SAM template deploys the resources and the IAM permissions required to run the application.
4
4
5
+
## Features
6
+
7
+
-**API Gateway REST API** with Lambda integration
8
+
-**Lambda function** that publishes messages to SNS
9
+
-**SNS topic** for message publishing
10
+
-**CloudWatch Alarm** monitoring API errors
11
+
-**Amazon CloudWatch Synthetics Canary** for automated API endpoint monitoring
12
+
-**AWS X-Ray tracing** enabled for distributed tracing on LAmbda and APIGW (incurs additional costs)
13
+
-**S3 bucket** for Synthetics artifacts storage
14
+
5
15
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/apigw-lambda-sns/.
6
16
7
-
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.
17
+
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. **Note: AWS X-Ray tracing is enabled which incurs additional charges based on traces recorded and retrieved.**You are responsible for any AWS costs incurred. No warranty is implied in this example.
8
18
9
19
## Requirements
10
20
11
-
12
21
*[Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) if you do not already have one and log in. The IAM user that you use must have sufficient permissions to make necessary AWS service calls and manage AWS resources.
13
22
*[AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
@@ -50,19 +59,27 @@ curl --location --request GET 'https://<api_id>.execute-api.<region>.amazonaws.c
50
59
```
51
60
In order to receive a notification, please make sure to configure subscription in the SNS topic.
52
61
62
+
### Additional Features
53
63
54
-
## Cleanup
64
+
- **CloudWatch Alarm**: Monitor the Synthetics Canary failures. The alarm triggers when the canary fails at least once within a 5-minute period.
65
+
- **Synthetics Canary**: Automatically tests the API endpoint every minute to ensure availability. If you want to alarm on this, you must manually create a CloudWatch Alarm or update the template
66
+
- **X-Ray Tracing**: Distributed tracing is enabled for both API Gateway and Lambda to help with debugging and performance analysis.
**Important**: You must manually delete the S3 bucket created for Synthetics artifacts after deleting the CloudFormation stack, as it will contain canary run artifacts.
82
+
66
83
----
67
84
Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
0 commit comments