Skip to content

CodeCommit Event #964

Closed
Closed
@mindrunner

Description

@mindrunner

Description:

I am writing a lambda function which is supposed to be triggered by CodeCommit. However, I cannot figure out how to add the permissions for CodeCommit. If I configure it via GUI (screenshot), it works without a problem.
2019-06-08-221854_1370x745_scrot

I saw, that there has been discussions about that.

#60
#920

I do not see a reason, why we should use workarounds like SNS (I haven't even seen a full example for this), if there is direct support for CodeCommit Events.

Observed result:

CodeCommit has no permission to invoke Lambda.

Expected result:

SAM accepts something like the following in template.yaml

Resources:
  CodePipelineTriggerFunction:
    Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
    Properties:
      CodeUri: src/
      Handler: app.lambda_handler
      Runtime: python3.7
      Tracing: "Active"
      Policies:
        - AWSCodePipelineFullAccess
      Events:
        CodeCommitTrigger:
          Type: CodeCommit
          Properties:
            RepositoryName: back-end
            TriggerName: back-end-trigger

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions