【发布时间】:2018-04-04 14:36:27
【问题描述】:
我需要在云形成中调用 lambda:
这是我的 yaml 模板:
#test-custom-func
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
project:
Description: project
Type: String
ConstraintDescription: Any string
EnvironmentApp:
Description: EnvironmentApp
Type: String
ConstraintDescription: Any string
Description: ddddd
Resources:
removeBucket:
Type: Custom::Myfunction
Properties:
ServiceToken: arn:aws:lambda:us-east-1:xxxxxxxxx:function:test1
这里是测试 lambda 函数:
exports.handler = (event, context, callback) => {
// TODO implement
console.log("rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr");
callback(null, 'Hello from Lambda');
};
如您所见,一切都非常基础。当我运行 yaml 堆栈时,它永远不会被创建并保持在创建进行中状态,并且在很长一段时间后它会失败。
我在使用自定义函数时有什么遗漏吗?
【问题讨论】:
标签: amazon-web-services aws-lambda amazon-cloudformation aws-opsworks