-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(lambda-nodejs): Documentation confusingly imports as lambda #22003
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-lambda-nodejsdocumentationThis is a problem with documentation.This is a problem with documentation.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2
Description
Describe the issue
In many projects, @aws-cdk/aws-lambda gets imported as lambda; this makes the code examples at https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs-readme.html confusing as users may expect that the existing import they have for the aws-lambda package will work.
The documentation is not incorrect if you have your imports the same as in the default.ts-fixture file, doing
import * as lambda from '@aws-cdk/aws-lambda-nodejs';But I'd argue that's an unlikely way for users to use this package (as they'll often still need other exported values from aws-lambda).
I'd be happy to open a PR to rename this to something like:
import * as lambdaNodejs from '@aws-ckd/aws-lambda-nodejs';and to make corresponding updates to the README etc; but I wanted to open an issue to discuss before implementing.
Links
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-lambda-nodejsdocumentationThis is a problem with documentation.This is a problem with documentation.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2