You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently DynamoDB Toolbox transpiles to CommonJS. This causes some issues when trying to use Lambda with ESM functions. If I bundle my function, and include the AWS SDK v3 in the bundle my function it works, if I exclude the AWS SDK from the bundle it doesn't work, because DynamoDB Toolbox attempts to require the files instead of import.
The AWS SDK is shipped with Lambda, and for my particular function when bundled is over 80% of the size of the function, so I don't want to bundle it.
Shipping an ES module version of DynamoDB toolbox will resolve this and allow me to exclude the AWS SDK's from my bundle.
I recently worked with the AWS Powertools team to implement dual module support in the upcoming v2 of Powertools. Happy to do the same here to implement it quickly.
I'm going to work on a quick PR to resolve this and submit it to be proactive on this.
The text was updated successfully, but these errors were encountered:
Currently DynamoDB Toolbox transpiles to CommonJS. This causes some issues when trying to use Lambda with ESM functions. If I bundle my function, and include the AWS SDK v3 in the bundle my function it works, if I exclude the AWS SDK from the bundle it doesn't work, because DynamoDB Toolbox attempts to
require
the files instead ofimport
.The AWS SDK is shipped with Lambda, and for my particular function when bundled is over 80% of the size of the function, so I don't want to bundle it.
Shipping an ES module version of DynamoDB toolbox will resolve this and allow me to exclude the AWS SDK's from my bundle.
I recently worked with the AWS Powertools team to implement dual module support in the upcoming v2 of Powertools. Happy to do the same here to implement it quickly.
I'm going to work on a quick PR to resolve this and submit it to be proactive on this.
The text was updated successfully, but these errors were encountered: