Skip to content

(cli): no message indicates that a hotswap happened #17778

@eladb

Description

@eladb

Description

When using watch or --swap and a hotswap occurs, I expect the CLI to tell me that a hotswap actually happened. Otherwise it seems like no-op.

Use Case

Since our deployment process is quite verbose already, and indicates when resources are provisioned, I'd expect a hotswap to also be displayed as a message.

Here's an example output:

Detected file changes during deployment. Invoking 'cdk deploy' again
👾 bundle » bundle:foo.lambda | esbuild --bundle src/foo.lambda.ts --target="node14" --platform="node" --outfile="assets/foo.lambda/index.js" --external:aws-sdk

  assets/foo.lambda/index.js  559b

⚠️ The --hotswap flag deliberately introduces CloudFormation drift to speed up deployments
⚠️ It should only be used for development - never use it for your production Stacks!
my-stack-dev: deploying...
[0%] start: Publishing 258d20bfa0b25ae5baec07ea31bd444fb2ceaadbbc3e210cfbf6c14326d911b9:current
[100%] success: Published 258d20bfa0b25ae5baec07ea31bd444fb2ceaadbbc3e210cfbf6c14326d911b9:current

 ✅  my-stack-dev

Stack ARN:
arn:aws:cloudformation:us-east-1:585695036304:stack/my-stack-dev/9807ac00-5200-11ec-98f7-0e39c015f87d

As you can see, the asset publishing is printed, but then then it just shows the stack name without any indication that the AWS Lambda code was hotswapped.

Proposed Solution

Print something like:

Hotswapping AWS Lambda code bla bla bla

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2package/toolsRelated to AWS CDK Tools or CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions