Skip to content

[amazon] Enhance DynamoDBHook with full CRUD methods (get_item, put_item, update_item, delete_item, query) #69050

Description

@gocoolp

Description

DynamoDBHook currently only exposes write_batch_data() and get_import_status(). There are no methods for the most common single-item operations: get, put, update, delete, and query. Every DAG that needs basic DynamoDB CRUD must implement its own boto3 wrapper outside the hook.

Use case/motivation

A common Airflow pattern is using DynamoDB as a lightweight job metadata store — writing job state on start, polling a status field for human approval, updating on completion. Today none of this can go through DynamoDBHook. DynamoDBValueSensor works around the gap by calling self.hook.conn.Table(...).get_item() directly, bypassing the
hook layer entirely.

The goal is a hook that covers the full single-item CRUD surface (get_item, put_item, update_item, delete_item, query) using the boto3 resource API — plain Python dicts, no typed {"S": "value"} format — so DAG authors get consistent retry config, error handling, and logging without reimplementing it per project.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions