Unable to Deploy Function when using Knex #2443
Labels
function
Issue pertaining to Amplify Function
pending-response
Issue is pending response from author
pending-triage
Incoming issues that need categorization
Environment information
Describe the bug
I am trying to use
knex
to connect to an RDS server with a connection string.When I create a js file with the following:
with a package.json
everything works.
However, when trying to do the same for a lambda function, i get the error:
What have I done to solve this? I was trying to follow: https://stackoverflow.com/questions/77131329/when-synth-or-deploy-with-aws-cdk-getting-bundling-error-related-to-knex/77147118#77147118
But i do not know how to apply that solution into any amplify backend config nor how to manually override that within
backend.ts
and usingCDK
directly to add theexternalModules
property.Any help would be appreciated!
Reproduction steps
Create an amplify backend with the following:
where:
The package json is (located in
amplify/package.json
):You should get the above error
The text was updated successfully, but these errors were encountered: