Skip to content

Add BatchWriteRecord and ListRecod apis to Sagemaker Feature Store Runtime#5983

Open
BassemHalim wants to merge 1 commit into
aws:masterfrom
BassemHalim:list-batch
Open

Add BatchWriteRecord and ListRecod apis to Sagemaker Feature Store Runtime#5983
BassemHalim wants to merge 1 commit into
aws:masterfrom
BassemHalim:list-batch

Conversation

@BassemHalim

@BassemHalim BassemHalim commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds BatchWriteRecord and ListRecords FeatureStore Runtime operations to the FeatureGroup resource class.

Changes

  • service-2.json: Updated from botocore 1.43.38 (adds BatchWriteRecord, ListRecords operations and related shapes)
  • additional_operations.json: Maps new operations to FeatureGroup resource with exclude_resource_attributes for ListRecords
  • shape_dag.py: Adds DAG entries for new shapes (BatchWriteRecordEntry, BatchWriteRecordResponse, ListRecordsRequest, etc.)
  • resources_codegen.py: Adds exclude_resource_attributes support to prevent incorrect self-mapping when a resource attribute name collides with an unrelated operation input
  • resources.py (generated): New batch_write_record() and list_records() methods on FeatureGroup
  • shapes.py (generated): New shape classes for BatchWriteRecord/ListRecords request/response types
  • test_feature_store_operations.py: Unit tests covering both methods, pagination, and nested response deserialization

Codegen Fix: exclude_resource_attributes

The codegen maps API input fields to self.<attr> when the field name matches a resource class attribute. This caused a bug: ListRecords.NextToken was mapped to self.next_token, which is the DescribeFeatureGroup pagination token (for FeatureDefinitions) — a completely different pagination context.

The fix adds an exclude_resource_attributes field to additional_operations.json that prevents specific resource attributes from being auto-mapped, making them regular method parameters instead.

Testing

  • Unit tests: 9 tests pass
  • Integration tests: Ran locally against an existing FeatureGroup in us-west-2 (not included in this PR)

…roup

Add two new FeatureStore Runtime operations to the FeatureGroup resource:
- batch_write_record: writes a batch of records to one or more FeatureGroups
- list_records: lists RecordIdentifier values stored in a FeatureGroup's OnlineStore

Changes:
- Update service-2.json from botocore 1.43.38
- Add shape classes (BatchWriteRecordEntry, BatchWriteRecordResponse, etc.)
- Add shape_dag entries and additional_operations mapping
- Add exclude_resource_attributes support to codegen to prevent
  FeatureGroup.next_token from being incorrectly mapped to
  ListRecords.NextToken (different pagination contexts)
- Regenerate resources.py and shapes.py via codegen

---
X-AI-Prompt: add batch_write_record and list_records to sagemaker-core FeatureGroup, fix codegen next_token bug
X-AI-Tool: kiro-cli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants