HomeWorkDynamodb_security

DynamoDB Resource-based Policies

Published Mar 2024
Updated Jun 2025
3 minutes read

Summary

Led end to end design for DynamoDB's resource-based policies feature that allows customers to manage access permissions directly on DynamoDB tables and streams.

This replaced the previous identity-based policy system and simplified cross-account access management.

DynamoDB resource-based policies in create flow
DynamoDB resource-based policies in create flow

Problem

DynamoDB's identity-based access control had three main limitations:

  1. Permission Management: Access permissions had to be defined in multiple IAM policies across different AWS accounts
  2. Cross-Account Setup: Required creating IAM roles in both accounts and setting up trust relationships
  3. Maintenance Overhead: Each new cross-account access required updating multiple IAM policies

This affected large AWS customers including Zoom, JP Morgan Chase, Snap, and Capital One.


Success Metrics

Tracked three key metric categories:

Adoption:

Task Success:

Usability:


Key Design Decisions

1. Multi-Step Creation Flow

Analysis of 6 months of usage data showed:

Implementation:

  1. Four-step creation process: details → settings → permissions → review
  2. Added quick create option for default tables
  3. Advanced features like resource policies shown only when needed
Single page creation
Single page creation
Issues with single page creation
Issues with single page creation
Introducing multi-step creation and adding permission step
Introducing multi-step creation and adding permission step

This approach balanced two key user needs:

2. Policy Editor Implementation

We faced a critical decision between building an in-house solution versus leveraging existing components:

AspectBuilt with In-house APIsExisting IAM Policy widget APIs
CustomizationCustom-built for DynamoDB policy statementsLimited customization options
IntegrationDirect integration with DynamoDB use casesPre-built with IAM access analyzer
DevelopmentRequired building validation logic from scratchProduction-tested and app-sec approved
DesignFull control over UI/UXBounded by IAM policy information architecture

We chose to be frugal and leverage the existing IAM policy APIs to power the policy editor, focusing our efforts on improving the integration points and user experience.

Policy creation widget v1
Policy creation widget v1
Policy creation widget v2
Policy creation widget v2
Policy creation widget v3
Policy creation widget v3
Policy creation widget v4
Policy creation widget v4, using existing IAM policy widget APIs (Launched)

Core Features

Resource-Centric Authorization

Policy Generation Experience

Multi-Page Creation Flow

Multi-step create flow step 1 with quick create for default tables
Multi-step create flow step 1 with quick create for default tables
Multi-step create flow step 3, dedicated step to define permissions using policy widget
Multi-step create flow step 3, dedicated step to define permissions using policy widget
Table detail view with a dedicated table to manage permissions for the table
Table detail view with a dedicated table to manage permissions for the table

Challenges

Technical Integration

Cross-Team Alignment


Impact

  1. Technical Improvements:

    • Reduced cross-account setup steps from 7 to 2
    • Centralized permission management per resource
    • Added automated policy validation
  2. User Experience:

    • Simplified multi-step table creation
    • Added guided policy creation
    • Improved error handling and validation

Learning

What Worked:

Issues Faced: