本文介绍了参数中缺少必需的键“Bucket"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将一个简单的 lambda 函数部署到 aws,但出现错误参数中缺少必需的键Bucket".我创建的用户拥有完整的 Lambda、S3、Cloudformation 和 Cloudwatch 访问权限.
I am trying to deploy a simple lambda function to aws but I get the error Missing required key 'Bucket' in params.The user I have created has full Lambda, S3, Cloudformation and Cloudwatch access.
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
推荐答案
在控制台中删除堆栈并重新部署堆栈通常会有所帮助.
Deleting the stack in console and deploying stack again usually helps.
如果它没有帮助,请尝试使用新名称部署堆栈(如果使用无服务器框架在 'service:' 之后更改名称).
If it does not help try deploying stack with a new name (if using Serverless framework change name after 'service:' ).
在此处讨论.
这篇关于参数中缺少必需的键“Bucket"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!