aws / aws/aws-sdk-php

Use UpdateExpression instead of AttributeUpdates in StandardSessionConnection

Open
#3,182 2 comments 1 reaction 1 assignee Claimed by @stobrien89 View on GitHub
feature-request
Dominant language
PHP
Stars
6.2k
Forks
1.3k
Avg merge
2h 53m
Merged PRs (30d)
7

Description

### Describe the feature

[When StandardSessionConnection writes](https://github.com/aws/aws-sdk-php/blob/0068088fed44e2bed3a2e82f2c7a0bb9e356b3c3/src/DynamoDb/StandardSessionConnection.php#L49-L81), it uses `AttributeUpdates` to determine which fields to update. [According to the docs](https://docs.aws.amazon.com/cli/latest/reference/dynamodb/update-item.html) this is a legacy parameter and UpdateExpression should be used instead.

### Use Case

This specifically came up because DynamoDB local v3 (incorrectly?) requires the Action to be set when updating an attribute that isn't yet on the item. It would be ideal to fix DynamoDB local instead, but I also imagine that aws-sdk-php would want to use non-legacy features of the API.

### Proposed Solution

_No response_

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### SDK version used

3.356.8

### Environment details (Version of PHP (`php -v`)? OS name and version, etc.)

PHP 8.3.25 on Alpine 3.22.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.