AWS Messaging Services Demo.
Before you start working with project you have to install dependency and prepare configuration.
Run from command line:
npm install
copy .env.local .env
Define configuration in file: .env
.
With SNS demo you can:
- Create SNS Topic:
npm run sns1
ornode sns/1_create_topic.js
- when you do that, remember about save ARN in variableSNS_TOPIC_ARN
(in file:.env
). - Run example app which will be receive messages:
npm run sns2
ornode sns/2_run_example_app.js
(HTTP server). - Subscribe topic:
npm run sns3
ornode sns/3_subscribe_topic.js
(Important: server from #2 have to be run and accessible from Internet) - Publish example message:
npm run sns4
ornode sns/4_publish_message.js
(Important: server from #2 have to be runned and accessible from Internet) - Delete SNS Topic and all subscription:
npm run sns5
ornode sns/5_delete_topic.js
With SQS demo you can:
- Create SQS queue:
npm run sqs1
ornode sns/1_create_queue.js
- when you do that, remember about save Queue URL in variableSQS_QUEUE_URL
(in file:.env
). - Run example app which will be receive messages:
npm run sqs2
ornode sns/2_run_example_worker.js
(worker). - Send example message:
npm run sqs3
ornode sns/3_send_message.js
(Important: worker from #2 have to be run) - Delete SQS Queue:
npm run sqs4
ornode sns/4_delete_queue.js
With Kinesis demo you can:
- Create Kinesis Stream:
npm run kinesis1
ornode sns/1_create_stream.js
. - Run example app which will be receive records:
npm run kinesis2
ornode sns/2_run_example_worker.js
(worker). - Put example record:
npm run kinesis3
ornode sns/3_put_record.js
(Important: worker from #2 have to be run) - Delete Kinesis Stream:
npm run kinesis4
ornode sns/4_delete_stream.js