我正在尝试将一个简单的 lambda 函数部署到 aws,但收到错误参数中缺少必需的键“Bucket”。
我创建的用户拥有完整的 Lambda、S3、Cloudformation 和 Cloudwatch 访问权限。
JS
'使用严格';
module.exports.hello = (event, context, callback) => {
const response = {
statusCode: 200,
body: JSON.stringify({
message: 'Go Serverless v1.0! Your function executed successfully!',
input: event,
}),
};
callback(null, response);
// Use this code if you don't use the http event with the LAMBDA-PROXY integration
// callback(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event });
};
YAML
service: lambda-demo
provider:
name: aws
runtime: nodejs6.10
functions:
hello:
handler: handler.hello
在控制台中删除堆栈并再次部署堆栈通常会有所帮助。
如果没有帮助,请尝试使用新名称部署堆栈(如果使用无服务器框架,请在 'service:' 之后更改名称)。
讨论过here https://github.com/serverless/serverless/issues/2341.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)