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

Lambda Tracing can't be Disabled in any (i think) construct involving lambda #95

Closed
flochaz opened this issue Oct 23, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@flochaz
Copy link

flochaz commented Oct 23, 2020

export class SqsXRayStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    new LambdaToSqsToLambda(this, 'LambdaToSqsToLambdaPattern', {
      producerLambdaFunctionProps: {
          runtime: lambda.Runtime.NODEJS_12_X,
          handler: 'index.handler',
          code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`)
      },
      consumerLambdaFunctionProps: {
        runtime: lambda.Runtime.NODEJS_12_X,
        handler: 'index.handler',
        code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`),
+        tracing: lambda.Tracing.DISABLED
      }
  });
  }
}

Result :

WARN AWS_SOLUTIONS_CONSTRUCTS_WARNING:  An override has been provided for the property: tracing. Default value: 'Active'. You provided: 'Disabled'.
Cannot read property 'cfnOptions' of undefined

Reproduction Steps

deploy a stack like this one:

import * as cdk from '@aws-cdk/core';
import * as lambda from '@aws-cdk/aws-lambda';
import { LambdaToSqsToLambda } from "@aws-solutions-constructs/aws-lambda-sqs-lambda";

export class SqsXRayStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    new LambdaToSqsToLambda(this, 'LambdaToSqsToLambdaPattern', {
      producerLambdaFunctionProps: {
          runtime: lambda.Runtime.NODEJS_12_X,
          handler: 'index.handler',
          code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`)
      },
      consumerLambdaFunctionProps: {
        runtime: lambda.Runtime.NODEJS_12_X,
        handler: 'index.handler',
        code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`),
        tracing: lambda.Tracing.DISABLED
      }
  });
  }
}

Error Log

> cdk "synth" "--profile" "dev"

WARN AWS_SOLUTIONS_CONSTRUCTS_WARNING:  An override has been provided for the property: tracing. Default value: 'Active'. You provided: 'Disabled'.
Cannot read property 'cfnOptions' of undefined

Environment

  • CDK CLI Version :
  • **CDK Framework Version:1.69.0
  • AWS Solutions Constructs Version :
  • OS :
  • Language :

Other

probably linked to


This is 🐛 Bug Report

@flochaz flochaz added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels Oct 23, 2020
@hnishar hnishar self-assigned this Nov 4, 2020
@hnishar hnishar added in-progress This issue is being actively worked on and removed needs-triage The issue or PR still needs to be triaged in-progress This issue is being actively worked on labels Nov 4, 2020
@hnishar
Copy link
Contributor

hnishar commented Nov 10, 2020

The fix for this issue has been pushed out in the latest release v1.72.0

@hnishar hnishar closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants