node.js Web客户端,可锻炼AWS SNS&SQS功能


基于来自AWS SQS示例的代码:https://www.youtube.com/watch?v = 4Z74luie2bg and https://github.com/andrewpuch/andrewpuch/aws-sqs-sqs-node-node-node-js-js-examples
在这里标记Allen的SNS代码:https://github.com/markcallen/snssqs/blob/master/create.js
CSS模板来自以下启发:https://www.sanwebe.com/2014/08/css-html-forms-designs
安装node.js:https://nodejs.org/en/
克隆回购并安装模块:
git clone https://github.com/ajyounguk/aws-sqs-sns-client
cd aws-sqs-sns-client
npm install
复制配置详细信息并添加您的AWS信用。
**请注意,不要将您的信誉归还给Git **
cd config
cp aws-config-sample.json aws-config.json
如果您需要将请求路由到代理,或者想将SQ/SNS请求路由到本地伪AWS服务(例如GoAW或localstack),则可以通过创建AWS-Override.json配置文件来覆盖内波特。
cd config
cp aws-override-sample.json aws-override.json
并编辑端点
对于IAM用户,添加组策略= amazonsqsfullaccess,amazonsnsfullaccess
运行网络服务器:
node app.js
将浏览器指向Local/RemoteIP端口3000以加载HTML表单,单击SNS/SQS按钮以选择所需的功能。
有关AWS SNS和SQS的更多信息:
https://aws.amazon.com/sns/ https://aws.amazon.com/sqs/
GOAW和LocalStack链接:
https://github.com/p4tin/goaws https://github.com/localstack/localstack