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.

(aws-lambda): Bundling with Docker not running

See original GitHub issue

I have my lambda configured to bundle inside a docker image. It was working at one point but now it refuses to ever trigger a build and ends up just uploading my lambda as is.

Here is the snippet I’m using. Is there something wrong I’m missing?

lambda.Code.fromAsset('/path/to/lambda/code'), {
      bundling: {
        image: lambda.Runtime.NODEJS_14_X.bundlingImage,
        command: [
          'bash', '-c', [
            'npm install',
            'npm prune --production',
            'cp -r /asset-input/{dist,node_modules} /asset-output/'
        user: 'root',


  • CDK CLI Version: 1.98.0 (build 79f4512)
  • Module Version: 1.98.0
  • Node.js Version: v15.14.0
  • OS: macOS 11.2.3
  • Language (Version): TypeScript 4.2.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

bpottiercommented, Apr 15, 2021

A bug I guess?

No, a syntax error in your code.

I shouldn’t expect some kind of error from running cdk synth?

github-actions[bot]commented, May 5, 2021


Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

(@aws-cdk/aws-lambda-python): (docker based bundling ...
The bundling and depdency management works as usual, if the docker daemon is running in the same machine. Current Behavior. error output. Error: ......
Read more >
Building, bundling, and deploying applications with the AWS ...
If we're running the AWS CDK as part of a CI/CD pipeline, this executable doesn't exist yet, so how do we create it?...
Read more >
Running aws-cdk in docker container breaks lambda bundling ...
I'm running cdk deploy inside a docker container within a Jenkins pipeline. If I want to use aws-lambda-nodejs as bundling it tries to...
Read more >
Docker Bundling - Deploy Lambda - GO ON AWS
With CDK Docker bundling you can deploy GO Lambda functions without having go locally installed. Usually it's more efficient to build GO with...
Read more >
Building and Deploying Lambdas from a Docker Container
As I noted in that post, there are options to work around this issue. One is to build the deployment bundle on an...
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