
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Utility tool to calculate the size of a DynamoDB items.
Utility tool to gain item size information for DynamoDB JSON items to understand capacity consumption and ensure items are under the 400KB DynamoDB limit.
DynamoDB SDK's can cater for both DDB-JSON or Native JSON. This package can be used to calculate both. By default it uses DDB-JSON but you can alter the methods to take Native JSON by passing a bool true value as a parameter to the method:
CalculateSize(item, true)

OS X & Linux:
npm install ddb-calc --save
const CALC = require('ddb-calc')
const item = {
"Id": {
"N": "101"
},
"Title": {
"S": "Book 101 Title"
},
"ISBN": {
"S": "111-1111111111"
},
"Authors": {
"L": [
{
"S": "Author1"
}
]
},
"Price": {
"N": "2"
},
"Dimensions": {
"S": "8.5 x 11.0 x 0.5"
},
"PageCount": {
"N": "500"
},
"InPublication": {
"BOOL": true
},
"ProductCategory": {
"S": "Book"
}
}
const size = CALC.CalculateSize(item);
{
rcu: 1,
wcu: 1,
size: 137
}
const isValid = CALC.IsUnderLimit(item);
true
For more examples and usage, please refer to the Wiki.
const item = {
"Id": 101,
"Title": "Book 101 Title",
"ISBN": "111-1111111111",
"Authors": [
"Author1"
],
"Price": 2,
"Dimensions": "8.5 x 11.0 x 0.5",
"PageCount": 500,
"InPublication": true,
"ProductCategory": "Book"
}
const size = CALC.CalculateSize(item, true);
{
rcu: 1,
wcu: 1,
size: 137
}
const isValid = CALC.IsUnderLimit(item, true);
true
CalculateSizeJson(item, true)CalculateSizeJson() and IsUnderLimitJson()marshalling capability for native JSONisUnderLimit() functionLee Hannigan – @leeroyhannigan – leeroy.hannigan@gmail.com
https://github.com/leeroyhannigan/DynamoDB-ItemSizeCalculator
git checkout -b feature/fooBar)git commit -am 'Add some fooBar')git push origin feature/fooBar)FAQs
Calculate the size of DynamoDB item in DynamoDB JSON
The npm package ddb-calc receives a total of 320 weekly downloads. As such, ddb-calc popularity was classified as not popular.
We found that ddb-calc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.