Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_lambda_nodejs: Adding bundling.nodeModules fails with "Error: EACCES: permission denied" #26352

Closed
rupe120 opened this issue Jul 13, 2023 · 3 comments
Labels
@aws-cdk/aws-lambda-nodejs bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@rupe120
Copy link

rupe120 commented Jul 13, 2023

Describe the bug

I am attempting to include the most recent version of the QuickSight SDK client, and added @aws-sdk/client-quicksight to bundling.nodeModules. The version in the Lambda runtime is slightly out of date.

When I run npx cdk synth the docker build fails with the error Error: EACCES: permission denied

Expected Behavior

A successful synth execution.

Current Behavior

Fails with a permission denied error.

Reproduction Steps

Create a NodejsFunction instance and add @aws-sdk/client-quicksight to the bundling.nodeModules. The following is my construct setup.

const startExportJobFunction = new NodejsFunction(this, 'start-export-job-function', {
      entry: 'lib/aws-stepfunction-servicecall-stack.start-asset-export-job.ts',
      handler: 'handler',
      runtime: lambda.Runtime.NODEJS_18_X,
      bundling: {
        nodeModules: ['@aws-sdk/client-quicksight'],
      },
      environment: {
        ACCOUNT_ID: this.account,
        REGION_ID: this.region,
      },
      tracing: lambda.Tracing.ACTIVE,
      insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_143_0,
      timeout: cdk.Duration.minutes(15),
    });

Possible Solution

I don't know the implementation well enough to say.

Additional Information/Context

No response

CDK CLI Version

2.87.0 (build 9fca790)

Framework Version

No response

Node.js Version

v18.16.1

OS

Windows 11 Enterprise build 22621.1702

Language

Typescript

Language Version

TypeScript 5.1.3

Other information

No response

@rupe120 rupe120 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 13, 2023
@pahud
Copy link
Contributor

pahud commented Jul 13, 2023

When I run npx cdk synth the docker build fails with the error Error: EACCES: permission denied

Can you share full log of the bundling that comes with the error when you run npx cdk synth? Looks like the bundling process is trying to write something but got permission denied.

@pahud pahud added p2 effort/medium Medium work item – several days of effort response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Jul 13, 2023
@github-actions
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jul 16, 2023
@4romgod
Copy link

4romgod commented Jul 9, 2024

I have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants