-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
2,760 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
## AWS Local SQS | ||
|
||
### Description | ||
|
||
Plugin for serverless-aws-lambda to trigger locally your sqs event defined lambdas automatically. | ||
Local Queues are created based on your serverless.yml. | ||
To define default and/or override Queue attributes see [Plugin configs](../src/plugins/sqs/types.ts). | ||
|
||
### Installation | ||
|
||
Import the plugin inside your defineConfig. | ||
|
||
```js | ||
// config.js | ||
const { defineConfig } = require("serverless-aws-lambda/defineConfig"); | ||
const { sqsPlugin } = require("serverless-aws-lambda/sqs"); | ||
|
||
module.exports = defineConfig({ | ||
plugins: [sqsPlugin(config)], | ||
}); | ||
``` | ||
|
||
### Supported Requests | ||
|
||
supports both AWS SDK and CLI requests. | ||
|
||
✅ supported | ||
🌕 planned | ||
❌ not planned | ||
|
||
- 🌕 AddPermission | ||
- ✅ ChangeMessageVisibility | ||
- ✅ ChangeMessageVisibilityBatch | ||
- 🌕 CreateQueue | ||
- ✅ DeleteMessage | ||
- ✅ DeleteMessageBatch | ||
- ✅ DeleteQueue | ||
- 🌕 GetQueueAttributes | ||
- 🌕 GetQueueUrl | ||
- 🌕 ListDeadLetterSourceQueues | ||
- ✅ ListQueues | ||
- ✅ ListQueueTags | ||
- ✅ PurgeQueue | ||
- ✅ ReceiveMessage | ||
- 🌕 RemovePermission | ||
- ✅ SendMessage | ||
- ✅ SendMessageBatch | ||
- 🌕 SetQueueAttributes | ||
- ✅ TagQueue | ||
- ✅ UntagQueue | ||
|
||
### Examples | ||
|
||
AWS CLI | ||
|
||
```bash | ||
aws sqs --region eu-west-1 --endpoint http://localhost:9999/@sqs list-queues | ||
``` | ||
|
||
AWS SDK | ||
|
||
```js | ||
import { SQSClient, ListQueuesCommand } from "@aws-sdk/client-sqs"; | ||
|
||
const client = new SQSClient({ | ||
region: "eu-west-1", | ||
endpoint: `http://localhost:9999/@sqs`, | ||
}); | ||
|
||
const queues = await client.send(new ListQueuesCommand({})); | ||
console.log(queues); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.