Skip to content

Is it possible to inject failures into DynamoDB request handling for chaos testing? #542

Answered by jdisanti
damc-dev asked this question in Q&A
Discussion options

You must be logged in to vote

While there isn't any built-in support for failure/latency injection, there are two approaches you can take for this:

  1. Override the default hyper/rustls HTTPS connector with your own delegating connector that injects the failures, or
  2. Set up a proxy to inject failures. There are a couple different threads that explore this approach, with the second one being a real world example by another SDK user.

I recently built a custom connector to diagnose a throttling failure for STS, so I've adapted that to DynamoDB below as an example of approach 1.

Cargo.toml dependencies

[dependencies]
aws-config = "0.12.0"
aws-sdk-dynamodb = "0.12.0"
aws-smithy-client = "0.42.0"
aws-smithy-http = "0.42.0"
bytes

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@damc-dev
Comment options

@ymwjbxxq
Comment options

Answer selected by damc-dev
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants