CodePipeline 使用一个简单的 println 调用 Lambda 最多需要 10 分钟

CodePipeline invoking Lambda with a simple println taking up to 10 minutes

我正在使用 CodePipeline,并在 Action/Stage 中隔离了一个 Lambda,以便在部署开始后发出 http 请求。

我可以在日志和监控选项卡上看到它在 500 毫秒左右完成,但操作一直等待 10 分钟才能结束。

我已经尝试过以下方法:

我现在的代码是hello word:

exports.handler = async (event) => {
    // TODO implement
    return 'Hello from Lambda!';
};

在所有这些情况下,Action/Stage 仍然需要 10 分钟才能完成。 我错过了什么吗?提前谢谢你。

从您的 Lambda 函数调用 PutJobSuccessResultPutJobFailureResult 以通知 CodePipeline 您的操作已完成。

举个例子:https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html#actions-invoke-lambda-function-create-function