aws-amplify / aws-amplify/amplify-cli
Add events category and CLI support for SQS and event driven architectures in general
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
**Is your feature request related to a problem? Please describe.**
Support for SQS, see https://github.com/aws-amplify/amplify-cli/issues/3326
**Describe the solution you'd like**
- Add a new category `events`
- Add ability to add, update and remove queues and topics through the CLI which AWS Lambdas can use for an event-driven system architecture
### Add queue and topics
```sh
$ amplify events add`
$ name of queue? products
$ do you want to add topics [Y/n]? Y
```
Calls script for adding topics to existing queue
```sh
Adding topics to products
$ what is the name of the topic? bought
$ do you want to add more topics [y/N]? N
created queue products`
with topics:
- bought
```
### Update queue or queue topics
```sh
$ amplify events update`
$ name of queue? products
$ do you want to
- rename queue
- add topics
- remove topics
```
For either choice, calls relevant script
*Rename*
```sh
What will be the new name of the queue? new_products
queue products has been renamed to new_products
Notice: Please change any references to the queue products in your application code
```
### Remove queue or queue topics
Remove entire queue or select topics
```sh
$ amplify events remove
Warning: This will remove the entire queue with all topics
$ name of queue to remove? products` (via list select)
$ remove the queue or select topics?
- remove entire queue (user selects this option)
- select topics
```
Given `remove entire queue` was selected
```sh
This will delete the queue products with the following topics:`
` - bought`
`$ Are you sure you want to delete the queue products [y/N]? Y`
`queue products deleted`
Given `select topics` selected
```sh
Which topics do you wish to remove?
- bought (select multiple from list of topics in that queue)
$ Are you sure you want to remove the product topic bought [y/N]? Y
products topic bought removed
```
This should cover a lot of common cases and scenarios
Ideally also via cli
- add ability for an AWS Lambda linked to a GraphQL mutation, to put the mutation body data directly on a given topic on a given queue
- add ability to designate an AWS Lambda to listen to a queue topic and forward any data received on it to a given GraphQL subscription
**Describe alternatives you've considered**
Currently the only option is to manually create SQS queues
Contributor guide
Assessment
This issue has not been assessed yet.