Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thesmartmonkey/create-serverless-aws-webhook
Serverless Webhook service on AWS with SNS and SQS
https://github.com/thesmartmonkey/create-serverless-aws-webhook
Last synced: about 16 hours ago
JSON representation
Serverless Webhook service on AWS with SNS and SQS
- Host: GitHub
- URL: https://github.com/thesmartmonkey/create-serverless-aws-webhook
- Owner: TheSmartMonkey
- License: mit
- Created: 2024-05-31T22:41:31.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-03T14:07:25.000Z (4 months ago)
- Last Synced: 2024-11-05T13:13:47.363Z (about 2 months ago)
- Language: TypeScript
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# create-serverless-aws-webhook
Based on : https://github.com/cdk-patterns/serverless/blob/main/the-big-fan/README.md
You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`CreateServerlessAwsWebhookStack`)
which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic.The `cdk.json` file tells the CDK Toolkit how to execute your app.
## Useful commands
* `npm run build` compile typescript to js
* `npm run watch` watch for changes and compile
* `npm run test` perform the jest unit tests
* `cdk deploy` deploy this stack to your default AWS account/region
* `cdk diff` compare deployed stack with current state
* `cdk synth` emits the synthesized CloudFormation template## Getting started
`localstack start -d`
`cdklocal bootstrap --profile localstack`
`cdklocal deploy --profile localstack`## Test the stack
Invoke lambda
```sh
awslocal lambda invoke --function-name CreateServerlessAwsWebhookSta-AllStatusFunctionE79FA16-ea36deec --cli-binary-format raw-in-base64-out --payload '{"body": "{\"num1\": \"10\", \"num2\": \"10\"}" }' output.txt
``````sh
curl -X POST http://localhost:4566/2015-03-31/functions/CreateServerlessAwsWebhookSta-AllStatusFunctionE79FA16-ea36deec/invocations -H "Content-Type: application/json" -d '{"key1": "value1"}'
```