A developer is building a high-throughput IoT monitoring application that writes status updates to an Amazon DynamoDB table. The table's partition key is DeviceId (String) and the sort key is Timestamp (Number). During peak times, the application receives a ProvisionedThroughputExceededException during write operations. Amazon CloudWatch metrics show that the overall write capacity consumed by the table is well below the provisioned Write Capacity Units (WCUs), but a few specific devices are writing data at an extremely high frequency. Which two actions should the developer take to resolve this issue and handle the write failures? (Choose two.)
- Construct a synthetic partition key by appending a calculated hash or random suffix to the DeviceId to distribute writes across multiple partitions.Cevap
- Implement exponential backoff and retries in the AWS SDK configuration to handle the write failures gracefully.Cevap
- CIncrease the provisioned Write Capacity Units (WCUs) of the table to handle the high volume of writes from the active devices.
- DRun a Scan operation with a FilterExpression on the DeviceId attribute to dynamically locate and throttle the high-volume devices.
- EInitialize the DynamoDB client using static, hardcoded IAM user access keys in the application code to guarantee high-priority access to the DynamoDB API.
Cevap
Construct a synthetic partition key by appending a calculated hash or random suffix to the DeviceId to distribute writes, and implement exponential backoff and retries in the AWS SDK configuration to handle the write failures gracefully.
The correct options recommend creating a synthetic partition key to distribute hot key writes across multiple partitions and implementing exponential backoff to handle transient write exceptions gracefully.
Adım Adım Çözüm
Anahtar Kavram
Handling DynamoDB hot partitions and transient write throttling through partition key design and client-side retry strategies.