Skip to content

(core/aws-lambda-nodejs/cli): Assets are not built for deploys with glob patterns (e.g. "*/Stack1") with --exclusively option #17717

@slaskowski-transactionlink

Description

What is the problem?

CDK skips bundling for some stacks for complex paths and glob patterns like cdk deploy -e "*/Stack*"

Reproduction Steps

// bin/app.ts
import * as lambda from "@aws-cdk/aws-lambda-nodejs";
import * as cdk from '@aws-cdk/core';

const production = new cdk.Stack(new cdk.App(), "prod");
const app = new cdk.Stack(production, "app");
new lambda.NodejsFunction(app, 'handler',  {});
// bin/app.handler.ts
export const handler = () => {}

Now run cdk deploy -e "*/app"

What did you expect to happen?

I expected stack stack to was successfully deployed

What actually happened?

CDK deploys  my entire project instead of bundled code of lambda

CDK CLI Version

134.0 (build dd5e12d)

Framework Version

No response

Node.js Version

v14.17.5

OS

Mac OS X 11.2.3

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/assetsRelated to the @aws-cdk/assets packagebugThis issue is a bug.closed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions