-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
How to use NodejsFunction with AWS-SDK? #7685
Comments
See also parcel-bundler/parcel#4547 because I'm not sure such a flag exists just yet (but it may, and I may have overlooked it in the Parcel docs). |
Hi @sdegutis For now I recommend using {
"peerDependencies": {
"aws-sdk": "*"
}
} or: {
"externals": [
"aws-sdk"
]
} With this setup, After #7169 gets merged, I have plans to add a |
Thanks @jogold! |
Also, this solution just now mentioned might already be viable for this module. Not sure if it's already been considered though. |
Thanks @jogold , I did see that issue, just wasn’t positive on the relevancy. |
❓ General Issue
The Question
I think the NodejsFunction function in the
aws-lambda-nodejs
may need another parameter. It uses Parcel to package the NodeJS-based function, but if that function doesrequire('aws-sdk')
from within that Lambda's code, Parcel will bundle that too, even though that module is natively available inside the Lambda function when called by AWS.Environment
Other information
I think if there was a way to tell Parcel to leave the
require
line as-is without transforming it, then theaws-lambda-nodejs
module could include that as an option for its constructor props.(Pinging @jogold as I was told that's who wrote this module and to bring this up to him.)
The text was updated successfully, but these errors were encountered: