The first defense is choosing a partition key with high cardinality and even access. Pick something that produces many distinct values and is queried uniformly. If you must key on time, prefix it with a hash or a shard number so writes scatter across partitions instead of stacking on the newest one. This is often called salting the key.
For a single scorching key, you split it. Salting appends a random suffix so one logical key becomes key_0 through key_9 across ten partitions, and a read fans out to all ten. That kills the write hot spot but makes reads more expensive because you now query ten places and merge. Caching the hot key in front of the database is usually cheaper, since a celebrity profile read a million times can be served from Redis instead of the shard.
Some systems rebalance automatically. They detect a partition that is too large or too busy and split it, then move half to another node. DynamoDB adaptive capacity does this by shifting throughput toward the hot partition within seconds. The trade-off is that detection takes time, so you still eat latency during the spike before the system reacts.