-
Notifications
You must be signed in to change notification settings - Fork 77
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
Can not use v3 of aws-sdk in lambda for manually created tables #2959
Labels
Comments
github-actions
bot
added
pending-triage
pending-maintainer-response
Issue is pending a response from the Amplify team.
labels
Oct 11, 2024
chrisbonifacio
added
bug
Something isn't working
Gen 2
and removed
pending-triage
labels
Oct 11, 2024
cwomack
removed
the
pending-maintainer-response
Issue is pending a response from the Amplify team.
label
Oct 16, 2024
Closing as the issue was me mixing commonjs exports with esmodules |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
Not applicable
Amplify Version
v6
Amplify Categories
storage, function, api
Backend
Amplify Gen 2 (Preview)
Environment information
Describe the bug
i'm creating a rest api based on this guide. The guide only goes as far as setting up API Gateway with a Lambda function (optionally with Cognito), but it does not cover saving data to dynamodb.
Using v3 of the aws-sdk, I am saving to dynamodb using the following imports:
From there, I am using the following method to save an item to the table:
While this deploys, I get a cryptic error message:
During debugging, I confirmed it has to do with the
PutCommand
. I refactored my code to use v2 of the aws-sdk and it worked as expected.Expected behavior
I expect to be able to use v3 of the aws-sdk on a manually created table when inside of a lambda function.
Reproduction steps
amplify/data
folderTable
using the L2 CDK constructCode Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: