question-mark
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-python: PythonFunction): unable to use bundling in BitBucket

See original GitHub issue

I want to specify a custom location for the output volume of the PythonFunction docker build instead of the default.

Use Case

When I build my PythonFunction inside bitbucket pipeline it result in the following errors:

Successfully built f9a2edaf9e2d
Successfully tagged cdk-027978ada45c27f70df7fa8b7d578bed26985c21721a65193aba99e73aee35e3:latest
Bundling asset TestStateMachine/TestStateMachine/TaskMonitoringLambda/Code/Stage...
docker: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories.
See 'docker run --help'.
FAIL test/mamcdk.test.ts (26.586 s)
  CDK Application
    ✕ encountered a declaration exception (9 ms)
  ● CDK Application › encountered a declaration exception
    Failed to bundle asset TestStateMachine/TestStateMachine/TaskMonitoringLambda/Code/Stage, bundle output is located at /tmp/cdk.out6iRb2m/asset.d942a7d32e9693e439c345510f27daa13c2af102da78a30659f334a62cefd8f6-error: Error: docker exited with status 125

The gist of it is docker: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories.

Proposed Solution

let user specify custom output volume location


This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jogoldcommented, May 5, 2021

This only happens during tests right?

Are you creating an App in your test? You should be able to specify an outDir for this App to avoid this error. Something like:

const app = new App({ outDir: path.join(process.env.BITBUCKET_CLONE_DIR, 'test') });
const stack = new Stack(app, 'TestStack');
0reactions
TRANTANKHOAcommented, May 5, 2021

thanks @jogold , just the thing I need!

Read more comments on GitHub >

github_iconTop Results From Across the Web

cdk-lambda-subminute - Python Package Health Analysis - Snyk
Ensure you're using the healthiest python packages ... (aws-lambda-python: PythonFunction): unable to use bundling in BitBucket #14156 ...
Read more >
Deploying AWS Lambda Python With Bitbucket Pipeline and ...
The 'Unable to import required dependencies' is thrown when you are using non-standard python libs and haven't added a Lambda Layer to your ......
Read more >
Cdk-lambda-subminute - npm.io
cdk version: 1.105.0 (build 4813992) Bundling did not produce any output. ... (aws-lambda-python: PythonFunction): unable to use bundling in BitBucket # ...
Read more >
aws-cdk/pipelines module - AWS Documentation - Amazon.com
The recommended way of connecting to GitHub or BitBucket is by using a ... If you are using asset bundling anywhere (such as...
Read more >
@aws-cdk/aws-lambda | Yarn - Package Manager
... handler path is incorrectly generated when using PythonFunction (#20083 (6787376) ... lambda-python: asset bundling fails on windows (#19270 (0da57da), ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found