HENNGE / aiodynamo

Asynchronous, fast, pythonic DynamoDB Client
https://aiodynamo.readthedocs.io/
Other
69 stars 20 forks source link

Properly support creating pay-per-request tables #158

Closed alexjurkiewicz closed 9 months ago

alexjurkiewicz commented 9 months ago

When creating a table in pay-per-request billing mode, don't specify provisioned throughput for GSIs.

It might be better to create two classes of the Table type, one for each billing mode. But that's a major (probably breaking) refactor, and the AWS API doesn't do this either.

ojii commented 9 months ago

For reference: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html

Oddly enough, the docs don't explain this clearly, it just mentions that ProvisionedThroughput on a GSI spec is optional...

Anyway, thank you for noticing this and the PR.

ojii commented 9 months ago

CI currently failing because 3.7 is EOL'd, please wait for https://github.com/HENNGE/aiodynamo/pull/161 to merge and then rebase (or I'll rebase & merge offline)

alexjurkiewicz commented 9 months ago

Done

ojii commented 9 months ago

mypy is being silly, i'll fix it.

alexjurkiewicz commented 9 months ago

I was looking too 😊 My fix is a little ugly, but satisfies the checker

ojii commented 9 months ago

merged locally, so closing this PR. Thank you.

alexjurkiewicz commented 9 months ago

Thanks for the help!