Lambda function never succeeds in codepipeline

僤鯓⒐⒋嵵緔 提交于 2019-12-02 00:53:09

Maybe I need to send 'putJobSuccessResult' as shown here to CodePipeline?

Yes, you need to call putJobSuccessResult from your Lambda function.

But if so then why if it's not a custom action?

This tells CodePipeline that your Lambda function is finished, and what to do next.

CodePipeline has a feature where if you pass a 'continuation token' then CodePipeline will re-invoke your function and pass the state in the continuation token to the next invocation. This allows you to have actions running longer than the Lambda invocation timeout. You can pass this info when you call putJobSuccessResult.

Also, it separates "failing an action" from "failing the function". This allows you to fail the action without failing the lambda function. This is desirable because Lambda has a retry behavior if the function fails.

And what are custom actions at all?

With a custom action you need your own code to call PollForJobs, which typically runs on eg. a long running EC2 instance. The Lambda invoke action will call a Lambda function without you having to run your own instance / host.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!