-
Notifications
You must be signed in to change notification settings - Fork 632
Closed
Labels
closing-soonThis issue will automatically close in 4 days unless further comments are made.This issue will automatically close in 4 days unless further comments are made.response-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
I am using AWS Lambda with the Node v18 runtime. I am using several @aws-sdk/*
packages, which should be globally available in the Node v18 runtime of AWS Lambda. This holds true for most packages. However, I get this error when trying to use @aws-sdk/util-retry
. The code looks like this:
import {
DynamoDBClient,
UpdateItemCommand,
QueryCommand
} from "@aws-sdk/client-dynamodb";
import { ConfiguredRetryStrategy } from "@aws-sdk/util-retry";
import {
CloudWatchClient,
PutMetricDataCommand
} from "@aws-sdk/client-cloudwatch";
and the error is:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@aws-sdk/util-retry' imported from /var/task/index.mjs
How can I know in advance which @aws-sdk/*
packages are available at runtime and which are not?
cf. #4401
SDK version number
@aws-sdk/util-retry
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
nodejs18.x
(whatever AWS Lambda uses)
Reproduction Steps
Use @aws-sdk/util-retry in ESM Node v18 Lambda runtime.
Observed Behavior
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@aws-sdk/util-retry' imported from /var/task/index.mjs
Expected Behavior
Import works
Possible Solution
No response
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
closing-soonThis issue will automatically close in 4 days unless further comments are made.This issue will automatically close in 4 days unless further comments are made.response-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.