-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(lambda): Specifying insightsVersion triggers warning to make lazy #17133
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS LambdabugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2
Description
What is the problem?
When specifying the insightsVersion property on a lambda function, the following warning is generated:
[Info at /my-app/LambdaInsightsVersions10980] Consider making this CfnMapping a lazy mapping by providing `lazy: true`: either no findInMap was called or every findInMap could be immediately resolved without using Fn::FindInMap
This only started occurring after adding the insightsVersion property to the lambda.
Reproduction Steps
Create a lambda function:
new NodejsFunction('my-fn', {
runtime: Runtime.NODEJS_14_X,
...baseFnOptions,
vpc,
functionName: 'foo'
handler: 'runFoo',
insightsVersion: LambdaInsightsVersion.VERSION_1_0_98_0
});
What did you expect to happen?
No warning
What actually happened?
A warning.
CDK CLI Version
1.111.0
Framework Version
No response
Node.js Version
14.15.4
OS
Windows
Language
Typescript
Language Version
Typescript 4.3.5
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS LambdabugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2