Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CodePipeline policy with LambdaInvokeAction wrongly assumes that ImportValue of a Lambda is the ARN but it is the logical ID

See original GitHub issue

🐛 Bug Report

What is the problem?

A CodePipeline with a LambdaInvokeAction wrongly assumes that ImportValue of a Lambda is the ARN but it is the logical ID. The pipeline policy also wrongly assumes the import value.

Reproduction Steps

Clone Install pip packages (assuming one has the npm package already) Run cdk synth --path-metadata false --version-reporting false --app "python3"

Verbose Log

Pipeline action Lines 78-82 are wrong and will fail

                    - 6
                    - Fn::Split:
                        - ":"
                        - Fn::ImportValue: SomeFunction

Policy Lines 135-138

          - Action: lambda:InvokeFunction
            Effect: Allow
              Fn::ImportValue: SomeFunction

The action is created thus

                        self, "function", core.Fn.import_value("SomeFunction")


  • CDK CLI Version: 1.5.0 (build c020efa)
  • Module Version: 1.6.1
  • OS: OSX Mojave
  • Language: Python

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

khornbergcommented, Sep 9, 2020

No I’ve since moved on

skinny85commented, Sep 5, 2020

@khornberg is there anything else we can help you with this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invoke an AWS Lambda function in a pipeline in CodePipeline
This topic assumes you are familiar with AWS CodePipeline and AWS Lambda and know how to create pipelines, functions, and the IAM policies...
Read more >
@aws-cdk/aws-codepipeline-actions | Yarn - Package Manager
This package contains Actions that can be used in a CodePipeline. import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ...
Read more >
codepipeline.putJobSuccessResult() Hanging when Invoking ...
The hanging behavior implies it is a networking issue, but if CodePipeline has an endpoint to the VPC and successfully is able to...
Read more >
@aws-cdk/aws-codepipeline: Versions | Openbase
Full version history for @aws-cdk/aws-codepipeline including change logs. ... lambda-python: handler path is incorrectly generated when using PythonFunction ...
Read more >
Cloudformation ImportValue within ParameterOverride ...
AWSTemplateFormatVersion: 2010-09-09 Transform: AWS::Serverless-2016-10-31 Description: SAM Template for Deploy Python code to Lambda Parameters ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found