# Request for triage/review: community.aws PR for new DynamoDB lookup plugin

**URL:** <https://forum.ansible.com/t/request-for-triage-review-community-aws-pr-for-new-dynamodb-lookup-plugin/45528>\
**Category:** Collection Development\
**Tags:** aws\
**Created:** [March 14, 2026, 11:30pm UTC](https://forum.ansible.com/t/request-for-triage-review-community-aws-pr-for-new-dynamodb-lookup-plugin/45528 "2026-03-14T23:30:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgadiev](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tgadiev/32/10466_2.png) [@tgadiev](https://forum.ansible.com/u/tgadiev)\
**Post date:** [March 14, 2026, 11:30pm UTC](https://forum.ansible.com/t/request-for-triage-review-community-aws-pr-for-new-dynamodb-lookup-plugin/45528/1 "2026-03-14T23:30:23Z")

</div>

Hi,

I would appreciate some guidance regarding a contribution to the

community.aws collection.

PR:

> <https://github.com/ansible-collections/community.aws/pull/2344>
>
> \# Add DynamoDB Query Lookup Plugin
> 
> \## SUMMARY
> 
> This PR adds a new lookup pl…ugin \`dynamodb\_query\` that enables querying AWS DynamoDB tables directly from Ansible playbooks. The plugin provides a convenient way to retrieve configuration data, application settings, and other dynamic values stored in DynamoDB tables as part of infrastructure-as-code workflows.
> 
> The plugin supports both Query (efficient, partition key-based) and Scan (full table scan) operations, with comprehensive support for DynamoDB features including secondary indexes, filter expressions, projection expressions, and automatic pagination.
> 
> \### Key Capabilities
> 
> \- Query items by partition key with optional sort key conditions
> \- Support for all DynamoDB sort key operators (EQ, LT, LE, GT, GE, BEGINS\_WITH, BETWEEN)
> \- Query Global Secondary Indexes (GSI) and Local Secondary Indexes (LSI)
> \- Filter expressions with expression attribute names and values
> \- Projection expressions to retrieve specific attributes
> \- Automatic pagination with configurable limits
> \- Full support for all DynamoDB data types including Sets (SS, NS, BS)
> 
> \### Use Cases
> 
> \- Retrieve application configuration from DynamoDB tables
> \- Query deployment metadata and environment-specific settings
> \- Fetch dynamic inventory data stored in DynamoDB
> \- Access feature flags and runtime configuration
> \- Retrieve secrets metadata (not the secrets themselves)
> 
> \## ISSUE TYPE
> 
> \- New Plugin Pull Request
> 
> \## COMPONENT NAME
> 
> \`dynamodb\_query\` (lookup plugin)
> 
> \## ADDITIONAL INFORMATION
> 
> \### Implementation Details
> 
> The plugin is built on top of \`AWSLookupBase\` and follows Ansible AWS collection best practices:
> 
> \- Uses \`boto3\` with automatic retry decorators for resilience
> \- Proper error handling with informative error messages
> \- Supports all standard AWS authentication methods (credentials, profiles, IAM roles)
> \- Handles DynamoDB pagination automatically
> \- Deserializes all DynamoDB data types to native Python types
> 
> \### Testing
> 
> Comprehensive test coverage has been implemented:
> 
> \#### Unit Tests (28 tests, ~90% code coverage)
> 
> \- \*\*Basic query operations\*\* - partition key, sort key, operators
> \- \*\*All sort key operators\*\* - EQ, LT, LE, GT, GE, BEGINS\_WITH, BETWEEN (including validation)
> \- \*\*Filter expressions\*\* - with expression attribute names/values
> \- \*\*Projection expressions\*\* - string and list formats
> \- \*\*Scan operations\*\* - full table scans
> \- \*\*Pagination handling\*\* - automatic pagination and with limits
> \- \*\*Error handling\*\* - ResourceNotFoundException, ValidationException, missing parameters
> \- \*\*Data type deserialization\*\* - String, Number, Boolean, List, Map, NULL, Binary, Sets (SS, NS, BS)
> \- \*\*Secondary indexes\*\* - GSI queries
> \- \*\*Advanced parameters\*\* - limit, descending order, pagination with limit
> 
> \#### Integration Tests (34 tests)
> 
> \- All sort key operators (EQ, LT, LE, GT, GE, BEGINS\_WITH, BETWEEN)
> \- Global Secondary Index (GSI) and Local Secondary Index (LSI)
> \- Filter expressions with built-in functions (\`attribute\_exists\`, \`size\`, \`contains\`)
> \- Projection expressions (string and list formats)
> \- Expression attribute names and values
> \- Pagination (automatic and with limit)
> \- All DynamoDB data types including Sets (SS, NS, BS)
> \- Empty results and error handling
> \- Scan operations
> \- Descending sort order
> 
> \### Documentation
> 
> Complete documentation included:
> 
> \- Module documentation with parameter descriptions
> \- 10+ usage examples covering common scenarios
> \- Return value documentation
> 
> \### Example Usage
> 
> \#### Simple Query by Partition Key
> 
> \`\`\`yaml
> \- name: Get user data
> ansible.builtin.debug:
> msg: "{{ lookup('community.aws.dynamodb\_query',
> table\_name='Users',
> partition\_key='user\_id',
> partition\_value='12345') }}"
> \`\`\`
> 
> \#### Query with Sort Key and Filter
> 
> \`\`\`yaml
> \- name: Get recent active orders
> ansible.builtin.debug:
> msg: "{{ lookup('community.aws.dynamodb\_query',
> table\_name='Orders',
> partition\_key='user\_id',
> partition\_value='12345',
> sort\_key='order\_date',
> sort\_value='2024-01-01',
> sort\_operator='GE',
> filter\_expression='#status = :active',
> expression\_attribute\_names={'#status': 'status'},
> expression\_attribute\_values={':active': 'active'}) }}"
> \`\`\`
> 
> \#### Query Using Global Secondary Index
> 
> \`\`\`yaml
> \- name: Find user by email
> ansible.builtin.debug:
> msg: "{{ lookup('community.aws.dynamodb\_query',
> table\_name='Users',
> index\_name='email-index',
> partition\_key='email',
> partition\_value='\[email protected\]') }}"
> \`\`\`
> 
> \#### Query with Projection Expression
> 
> \`\`\`yaml
> \- name: Get specific user attributes
> ansible.builtin.debug:
> msg: "{{ lookup('community.aws.dynamodb\_query',
> table\_name='Users',
> partition\_key='user\_id',
> partition\_value='12345',
> projection\_expression=\['user\_id', 'name', 'email'\]) }}"
> \`\`\`
> 
> \#### Query with Limit and Descending Order
> 
> \`\`\`yaml
> \- name: Get last 10 orders
> ansible.builtin.debug:
> msg: "{{ lookup('community.aws.dynamodb\_query',
> table\_name='Orders',
> partition\_key='user\_id',
> partition\_value='12345',
> limit=10,
> scan\_index\_forward=false) }}"
> \`\`\`
> 
> \#### Scan Operation
> 
> \`\`\`yaml
> \- name: Scan small table with filter
> ansible.builtin.debug:
> msg: "{{ lookup('community.aws.dynamodb\_query',
> table\_name='Config',
> operation='scan',
> filter\_expression='#env = :prod',
> expression\_attribute\_names={'#env': 'environment'},
> expression\_attribute\_values={':prod': 'production'},
> limit=100) }}"
> \`\`\`
> 
> \### Tested With
> 
> \- Python 3.11, 3.12, 3.13
> \- ansible-core 2.14+
> \- boto3 1.34.0+
> \- botocore 1.34.0+
> 
> All sanity tests and unit tests pass successfully.
> 
> \## Integration Tests Note
> 
> Integration tests are failing in CI due to missing IAM permissions. The CI role needs additional permissions:
> \- \`dynamodb:Query\`
> \- \`dynamodb:Scan\`
> 
> All integration tests (34 tests) pass successfully when run locally with proper AWS credentials.
> 
> \### Related Documentation
> 
> \- \[DynamoDB Query API\](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API\_Query.html)
> \- \[DynamoDB Scan API\](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API\_Scan.html)
> \- \[DynamoDB Data Types\](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html)
> \- \[Ansible Lookup Plugins\](https://docs.ansible.com/ansible/latest/plugins/lookup.html)

This PR introduces a new lookup plugin:

community.aws.dynamodb\_query

Current status:

- implementation completed

- documentation added

- unit tests implemented

- integration tests implemented and passing locally

Open question:

Integration tests in CI require DynamoDB permissions

(dynamodb:Query, dynamodb:Scan) for the test role.

The PR has been open for some time and may simply be waiting for triage.

Could someone from the AWS collection maintainers or the AWS working group

advise on:

- whether the PR is in the right shape for review

- whether the test approach is acceptable

- what the recommended next step would be

Any feedback would be greatly appreciated.

Thanks.
