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

fix: lambda-nodejs default runtime regression #26763

Merged
merged 10 commits into from
Aug 16, 2023
Merged

fix: lambda-nodejs default runtime regression #26763

merged 10 commits into from
Aug 16, 2023

Commits on Aug 15, 2023

  1. fix: lambda-nodejs default runtime regression

    Previously we changed the default version of the lambda-nodejs Function
    construct to go from using the `builtInNodeJsCustomResourceRuntime`, a
    map of regions to available versions, to `lambda.Runtime.NODEJS_18_X`.
    The default `externalModule` configuration excluded the aws-sdk
    version based on the runtime passed, excluding v2 for Node16 and under,
    and v3 for Node18 and up, but users can pass their own bundling
    configuration excluding `aws-sdk` while not explicitly passing a
    runtime, which caused their functions to break.
    
    Adds a new `lambda.Runtime` value for `NODEJS_LATEST`. This is central
    reference for the latest version of NodeJS provided by the lamdba
    service. It also includes a new property `isLatest` which can be used to
    indicate that the runtime version may change over time. This can used to
    indicate that relying on packages shipped with the environment may not
    be relied upon if the version changes. We default to using the
    `NODEJS_LATEST` runtime only if the feature flag is enabled. If the flag
    is not enabled, use `NODEJS_16_X` to keep supporting users current
    bundling configurations.
    
    Additionally, add a warning to tell users if they are excluding a
    package from their bundling that we know doesn't exist within the
    runtime they are using. IE, if using `NODEJS_18_X` and the exclude list
    includes `aws-sdk`, warn users that it won't be present.
    
    fixes: #26732
    MrArnoldPalmer committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    9639ffd View commit details
    Browse the repository at this point in the history
  2. add integ test

    MrArnoldPalmer committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    31874ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0fa68c4 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. fix test

    MrArnoldPalmer committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    3162100 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2c452af View commit details
    Browse the repository at this point in the history
  3. additional warnings and documentation

    Adds to the `externalModules` doc string to tell the default is `[]`
    when `NODEJS_LATEST` runtime is used.
    
    Adds to the README to detail that `externalModules` defaults to empty
    when using `NODEJS_LATEST` and that `NODEJS_LATEST` is the default when
    the feature flag is enabled. Also detail that `NODEJS_LATEST` is
    designed to update as new versions are available and packages vended
    with the environment may change.
    
    Add a warning that is emitted when using `NODEJS_LATEST` and any
    dependencies are external.
    MrArnoldPalmer committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    6898b4e View commit details
    Browse the repository at this point in the history
  4. readme typo

    MrArnoldPalmer committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    5be442f View commit details
    Browse the repository at this point in the history
  5. lint fixes

    MrArnoldPalmer committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    dd8e31a View commit details
    Browse the repository at this point in the history
  6. example compile

    MrArnoldPalmer committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    7ef9a13 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9203317 View commit details
    Browse the repository at this point in the history