Skip to content

Lambda transform hangs indefinitely #5437

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

Open
Swisk opened this issue Apr 16, 2025 · 1 comment
Open

Lambda transform hangs indefinitely #5437

Swisk opened this issue Apr 16, 2025 · 1 comment
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed

Comments

@Swisk
Copy link

Swisk commented Apr 16, 2025

Describe what happened

when trying to run a transform to modify a lambda created elsewhere to work within a VPC, pulumi hangs indefinitely.

To note, it works when using transformations instead of transforms, so this leads one to conclude there is something specific about how transforms is implemented that causes the difference.

Sample program

assuming lambda created elsewhere in some component

export class Lambda extends pulumi.ComponentResource {
  constructor(
    name: string,
    args: LambdaModuleArgs,
    opts?: pulumi.ComponentResourceOptions,
  ) {
     ....const lambdaFunction = new aws.lambda.Function(
      ...
}

const myLambda = new Lambda(
      `${name}`,
      {
        args: value
      },
      {
        parent: this,
        transforms: [addVpcConfigToLambda],
      },
    );

where the transform logic looks like this:

const addVpcConfigToLambda: pulumi.ResourceTransform = (
      args: ResourceTransformArgs,
    ): ResourceTransformResult | undefined => {
      if (args.type === "aws:lambda/function:Function") {

        const vpcConfig: aws.types.input.lambda.FunctionVpcConfig = {
          subnetIds: mySubnetIds,
          securityGroupIds: [mySecurityGroup.id],
        };

        const updatedProps = { ...args.props, vpcConfig: vpcConfig };

        // Return the modified properties and original options
        return { props: updatedProps, opts: args.opts };
      }

      return { props: args.props, opts: args.opts };
    };

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

CLI
Version 3.160.0
Go Version go1.24.1
Go Compiler gc

Plugins
KIND NAME VERSION
resource aws 6.69.0
resource aws 6.45.0
resource aws-native 1.25.0
resource aws-native 0.110.0
resource aws-native 0.110.0
resource aws-native 0.110.0
resource aws-native 0.110.0
resource aws-native 0.110.0
resource aws-native 0.110.0
resource aws-native 0.110.0
resource awsx 2.13.0
resource cloudflare 5.33.1
resource command 1.0.2
resource datadog 4.28.1
resource docker 4.6.1
resource docker 3.6.1
language nodejs 3.160.0-dev.0
resource random 4.16.8
resource time 0.0.17
resource tls 5.0.10

Host
OS darwin
Version 15.4
Arch arm64

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@Swisk Swisk added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Apr 16, 2025
@corymhall
Copy link
Contributor

@Swisk thanks for reporting this issue. Can you provide us a program that we can use to reproduce the issue? Thanks!

@corymhall corymhall added needs-repro Needs repro steps before it can be triaged or fixed awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed
Projects
None yet
Development

No branches or pull requests

2 participants