Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: DynamoDBProvider not tokenizing projection values/names correctly #1238

Closed
dreamorosi opened this issue Jan 13, 2023 · 1 comment · Fixed by #1239
Closed

Bug: DynamoDBProvider not tokenizing projection values/names correctly #1238

dreamorosi opened this issue Jan 13, 2023 · 1 comment · Fixed by #1239
Assignees
Labels
bug Something isn't working completed This item is complete and has been merged/shipped parameters This item relates to the Parameters Utility

Comments

@dreamorosi
Copy link
Contributor

Expected Behaviour

As a customer, when using the DynamoDBProvider part of the Parameters utility, I want to be able to retrieve values from a DynamoDB Table that uses any of the reserved words as attribute name.

In order to allow this, the provider should be able to transparently tokenize these words under the hood.

Current Behaviour

At the moment, using any of the reserved words as attribute name causes the SDK client to throw an error as they are not tokenized.

Code snippet

const provider = new DynamoDBProvider({
  tableName: 'some-table',
  valueAttr: 'value' // <- this is a reserved word
});

Possible Solution

Use the ExpressionAttributeNames field in the query requests.

Steps to Reproduce

N/A

AWS Lambda Powertools for TypeScript version

latest

AWS Lambda function runtime

18.x

Packaging format used

Npm

Execution logs

No response

@dreamorosi dreamorosi added bug Something isn't working parameters This item relates to the Parameters Utility completed This item is complete and has been merged/shipped labels Jan 13, 2023
@dreamorosi dreamorosi added this to the Parameters - Beta release milestone Jan 13, 2023
@dreamorosi dreamorosi self-assigned this Jan 13, 2023
@dreamorosi dreamorosi moved this from Shipped to Pending review in AWS Lambda Powertools for TypeScript Jan 13, 2023
@github-project-automation github-project-automation bot moved this from Pending review to Coming soon in AWS Lambda Powertools for TypeScript Jan 13, 2023
@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dreamorosi dreamorosi removed the completed This item is complete and has been merged/shipped label Jan 13, 2023
@github-actions github-actions bot added the pending-release This item has been merged and will be released soon label Jan 13, 2023
@dreamorosi dreamorosi moved this from Coming soon to Shipped in AWS Lambda Powertools for TypeScript Feb 27, 2023
@dreamorosi dreamorosi added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed This item is complete and has been merged/shipped parameters This item relates to the Parameters Utility
Projects
None yet
1 participant