stash-dynamodb

Encrypt and decrypt DynamoDB items with CipherStash field-level encryption.

156|6|Updated Nov 14, 2024
One-click install
npx skills add https://github.com/cipherstash/stack --skill stash-dynamodb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stash-dynamodb
Source: https://github.com/cipherstash/stack/tree/main/skills/stash-dynamodb
Command: npx skills add https://github.com/cipherstash/stack --skill stash-dynamodb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @cipherstash/stack, @aws-sdk/client-dynamodb, @aws-sdk/lib-dynamodb, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables seamless integration of CipherStash field-level encryption with Amazon DynamoDB, protecting sensitive data at rest and enabling secure querying.

Core Features & Use Cases

  • Item Encryption/Decryption: Encrypts items before PutItem and decrypts after GetItem.
  • Bulk Operations: Supports BatchWrite and BatchGet for efficient processing.
  • Querying Encrypted Keys: Allows querying using encrypted partition or sort keys via HMAC attributes.
  • Nested Object Encryption: Handles encryption for nested data structures.
  • Audit Logging: Provides optional audit metadata for encryption operations.
  • Use Case: Securely store user PII in DynamoDB, encrypting fields like email and SSN, while still allowing lookups based on these encrypted fields using HMAC attributes.

Quick Start

Use the stash-dynamodb skill to encrypt the 'user' object before saving it to DynamoDB.

Frequently Asked Questions about stash-dynamodb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Can I encrypt DynamoDB partition and sort keys and still query them using HMAC attributes?

Yes, DynamoDB partition and sort keys can be encrypted and queried using HMAC attributes. This approach allows secure lookups on encrypted fields by matching hashed values without exposing the plaintext data.

How do I handle field-level encryption for nested objects before writing to DynamoDB?

Field-level encryption for nested objects is handled before DynamoDB writes by processing nested data structures. The encryption logic encrypts nested attributes prior to PutItem operations and decrypts them after GetItem.

Does DynamoDB field-level encryption support bulk operations like BatchWrite and BatchGet?

DynamoDB field-level encryption supports bulk operations including BatchWrite and BatchGet. This enables efficient processing of multiple encrypted items simultaneously during bulk reads and writes.

What is the best way to store user PII securely in DynamoDB without losing search capabilities?

Store user PII securely in DynamoDB by applying field-level encryption to sensitive fields like email and SSN. Secure search capabilities are preserved by querying encrypted fields using HMAC attributes.

Can I generate audit logs for DynamoDB encryption operations on sensitive data fields?

Yes, audit logs can be generated for DynamoDB encryption operations. Optional audit metadata is provided during the encryption process to track and record operations on sensitive data fields.