Skip to content

Invalid resource for policy template: CodePipelineLambdaExecutionPolicy #389

@cplee

Description

@cplee

Description:

Invalid resource for policy template: CodePipelineLambdaExecutionPolicy
The codepipeline:PutJobSuccessResult and codepipeline:PutJobFailureResult actions require * for the resource in an IAM policy statement. The statement in the policy_templates.json is invalid:

https://github.com/awslabs/serverless-application-model/blob/develop/samtranslator/policy_templates_data/policy_templates.json#L838

Steps to reproduce the issue:

  1. Create a CFN template for a SAM
  2. Reference the policy template CodePipelineLambdaExecutionPolicy: {}
  3. Create the stack
  4. Try to access the lambda function from a pipeline action

Observed result:
Pipeline times out waiting for acknowledgement from lambda function because lambda function gets access denied error:

Aws::CodePipeline::Errors::AccessDeniedException: User: arn:aws:sts::0000000000:assumed-role/aws-serverless-repository-cfn/foo is not authorized to perform: codepipeline:PutJobFailureResult

Expected result:
Lambda should be able to acknowledge the pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions