Node.js Klien Web yang Mengeksekusi Fungsionalitas AWS SNS & SQS


Berdasarkan Kode dari AWS SQS Contoh di: https: //www.youtube.com/watch? V = 4z74luie2bg dan https://github.com/andrewpuch/aws-sqs-node-js-examples
Kode SNS Mark Allen di sini: https://github.com/markcallen/snssqs/blob/master/create.js
Template CSS Terinspirasi dari: https://www.sanwebe.com/2014/08/css-html-forms-designs
Instal Node.js: https://nodejs.org/en/
Kloning repo dan instal modul:
git clone https://github.com/ajyounguk/aws-sqs-sns-client
cd aws-sqs-sns-client
npm install
Salin detail konfigurasi dan tambahkan kredo AWS Anda.
** Harap berhati -hati dan jangan berkomitmen kembali ke git **
cd config
cp aws-config-sample.json aws-config.json
Jika Anda perlu merutekan permintaan Anda ke proxy, atau ingin merutekan permintaan SQS/SNS ke layanan pseudo AWS lokal (mis.
cd config
cp aws-override-sample.json aws-override.json
dan edit titik akhir
Untuk pengguna IAM, tambahkan kebijakan grup = amazonqsfullaccess, amazonsnsfullaccess
Jalankan server web:
node app.js
Arahkan browser Anda di port lokal/jarak jauh 3000 untuk memuat formulir HTML, klik tombol SNS/SQS untuk memilih fungsionalitas yang diperlukan.
Untuk informasi lebih lanjut tentang AWS SNS dan SQS:
https://aws.amazon.com/sns/ https://aws.amazon.com/sqs/
GOAWS DAN LOCALSTACK LINK:
https://github.com/p4tin/goaws https://github.com/localstack/localstack