【发布时间】:2019-08-10 02:20:06
【问题描述】:
我在 Elastic Beanstalk 中运行一个快速应用程序,并且在一个路由中我使用 aws-sdk 向 sns 发布通知。
这在本地运行时有效,但在 Elastic Beanstalk 环境中我将/可以如何设置凭据“myprofile”?
router.post('/publish', async (req, res) => {
var AWS = require('aws-sdk')
AWS.config.update({region: 'us-east-2'})
// myprofile exists locally, but how do I deal with this in the elastic beanstalk environment?
var credentials = new AWS.SharedIniFileCredentials({profile: 'myprofile'})
AWS.config.credentials = credentials
//...more stuff
})
【问题讨论】:
标签: amazon-web-services aws-sdk amazon-elastic-beanstalk