How to trigger a lambda from CodeCommit ? #24364
-
It is straightforward to do from the AWS web console. How to do something similar directly from the CDK? I cannot find docs about it. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@aurelien-leloup , this is acheivable through using eventSourceMapping but code commit repo is currently not supported. Please refer to this - https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html However, you can still invoke your Lambda function from a CodeCommit event by creating an AWS CodePipeline and configuring it to trigger your Lambda function whenever a new commit is made to your CodeCommit repository. Sharing the reference for creating code commit repo using Pipelines in CDK. |
Beta Was this translation helpful? Give feedback.
-
Hi @khushail , |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@aurelien-leloup , this is acheivable through using eventSourceMapping but code commit repo is currently not supported. Please refer to this - https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html
However, you can still invoke your Lambda function from a CodeCommit event by creating an AWS CodePipeline and configuring it to trigger your Lambda function whenever a new commit is made to your CodeCommit repository. Sharing the reference for creating code commit repo using Pipelines in CDK.