
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.
@awsless/dynamodb-server
Advanced tools
A local DynamoDB server for testing and development. Provides both a fast in-memory implementation and a Java-based implementation using the official AWS DynamoDB Local.
A local DynamoDB server for testing and development. Provides both a fast in-memory implementation and a Java-based implementation using the official AWS DynamoDB Local.
Install with (NPM):
npm i @awsless/dynamodb-server
import { DynamoDBServer } from '@awsless/dynamodb-server'
// Create a server with the fast in-memory engine (default)
const server = new DynamoDBServer()
// Or use the Java engine for full compatibility
const server = new DynamoDBServer({ engine: 'java' })
// Start the server
await server.listen(8000)
// Get a DynamoDB client configured to use the local server
const client = server.getClient()
// Get a DynamoDB Document client
const documentClient = server.getDocumentClient()
// Stop the server when done
await server.stop()
The in-memory engine is optimized for speed and is perfect for unit tests. It implements the core DynamoDB operations without requiring Java.
const server = new DynamoDBServer({ engine: 'memory' })
The Java engine uses AWS DynamoDB Local for full compatibility with DynamoDB behavior. Requires Java to be installed.
const server = new DynamoDBServer({ engine: 'java' })
const server = new DynamoDBServer({
// Engine type: "memory" (default) or "java"
engine: 'memory',
// Hostname to bind to (default: "localhost")
hostname: 'localhost',
// Port to listen on (default: auto-assigned)
port: 8000,
// AWS region (default: "us-east-1")
region: 'us-east-1',
})
You can subscribe to item changes using stream callbacks:
const unsubscribe = server.onStreamRecord('my-table', record => {
console.log('Stream event:', record.eventName) // INSERT, MODIFY, or REMOVE
console.log('Keys:', record.dynamodb.Keys)
console.log('New Image:', record.dynamodb.NewImage)
console.log('Old Image:', record.dynamodb.OldImage)
})
// Unsubscribe when done
unsubscribe()
import { DynamoDBServer } from '@awsless/dynamodb-server'
import { CreateTableCommand } from '@aws-sdk/client-dynamodb'
import { PutCommand, GetCommand } from '@aws-sdk/lib-dynamodb'
describe('My DynamoDB Tests', () => {
const server = new DynamoDBServer()
beforeAll(async () => {
await server.listen()
// Create your tables
await server.getClient().send(
new CreateTableCommand({
TableName: 'users',
KeySchema: [{ AttributeName: 'id', KeyType: 'HASH' }],
AttributeDefinitions: [{ AttributeName: 'id', AttributeType: 'N' }],
BillingMode: 'PAY_PER_REQUEST',
})
)
})
afterAll(async () => {
await server.stop()
})
it('should store and retrieve items', async () => {
const client = server.getDocumentClient()
await client.send(
new PutCommand({
TableName: 'users',
Item: { id: 1, name: 'John' },
})
)
const result = await client.send(
new GetCommand({
TableName: 'users',
Key: { id: 1 },
})
)
expect(result.Item).toEqual({ id: 1, name: 'John' })
})
})
MIT
FAQs
A local DynamoDB server for testing and development. Provides both a fast in-memory implementation and a Java-based implementation using the official AWS DynamoDB Local.
The npm package @awsless/dynamodb-server receives a total of 89 weekly downloads. As such, @awsless/dynamodb-server popularity was classified as not popular.
We found that @awsless/dynamodb-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.