Comments (5)
The dependency has been removed in the v0.2 branch.
from dynamodb-toolbox.
Been thinking more about this and I'm going to remove this dependency from the project. Instead, I'm going to require you to pass in an instance of the DynamoDB DocumentClient
. v0.2 is moving to issuing calls directly (rather than just returning a formatted call), so this will give you the ability to fully control your AWS SDK settings.
from dynamodb-toolbox.
The recommended practice is NOT to rely on the included SDK in the Node runtimes, but making this optional would make sense. Also, if you are webpacking your Lambda functions, then the tree-shaking will significantly reduce the dependency size.
from dynamodb-toolbox.
Thanks for your response.
Oh, that's strange; why's it not good practice to rely on the included SDK? Why wouldn't it be safe to assume that the version appropriate to the NodeJS runtime is available and fully functional. I've never had any problems, but that's not to say their aren't things I'm not aware of!
from dynamodb-toolbox.
Hi @alexdilley
I don't want to start a discussion over this topic (it's not the place). However, I can offer you a hack that can be useful in development when you deploy to AWS often and you are not using sets.
Go to node_modules/dynamodb-toolbox/package.json
in your project and remove aws-sdk
from dependencies. Then the serverless framework will not include it. For my simple project package size went down from 9MB to ~600KB, deploys are significantly faster now.
Also, in your own project set aws-sdk
as dev dependency otherwise, this hack will not work for you.
@jeremydaly is using AWS-SDK to create sets on line 508 & 512 you can see it here
https://github.com/jeremydaly/dynamodb-toolbox/blob/master/index.js#L508. If you're not using it you're safe to remove it.
Again, it's a dirty hack. You've been warned :-)
from dynamodb-toolbox.
Related Issues (20)
- $add signature for Sets not matching documentation HOT 2
- EQ operator missing from Range Conditions HOT 2
- Unable to match expression attribute path with schema HOT 2
- Suggestion: Allow enums on enum type HOT 2
- Link should apply for put and update by default HOT 1
- Unable to update Map item for optional Map HOT 3
- Extending v1 Entity HOT 3
- `EntityAction` is missing from the global export (v1) HOT 1
- Invalid attribute detected while formatting HOT 5
- UpdateItemCommand seems to be successful but there are no changes in the DB HOT 6
- Issue with the typing for the query / scan `filters` HOT 2
- Update item that does exists in the db HOT 4
- computeKey and prefix HOT 2
- `updateLink` typing is confusing to use HOT 3
- Question regarding `FormattedItem<ENTITY>` type helper HOT 4
- Key Typing for Links affects GetItem HOT 7
- Unexpected token 'export' in sveltekit HOT 6
- Issue with ESM imports HOT 1
- Missing required attribute for formatting: 'created' HOT 5
- Conditional Put doesn't seem to respect any attr beside the Sort Key HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamodb-toolbox.