-
For EC2, I want to have different value for maxAttempts based on the command I am executing. Is it possible to override this value after the EC2Client object is created? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @DeepaAh, The JS SDK does not let you supply an operation level configuration. Only client level. The right way to do it would be to initialize a client with your desired maxAttempts and call your operation from there. And then use a different client for the default maxAttempts. I'm not sure about all the other SDKs, but the GO SDK lets you do that by supplying a callback function as an argument on the operation function call, where you can provide your own custom Retryer implementation. That behavior is not supported in the JS SDK. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @DeepaAh,
The JS SDK does not let you supply an operation level configuration. Only client level. The right way to do it would be to initialize a client with your desired maxAttempts and call your operation from there. And then use a different client for the default maxAttempts.
I'm not sure about all the other SDKs, but the GO SDK lets you do that by supplying a callback function as an argument on the operation function call, where you can provide your own custom Retryer implementation. That behavior is not supported in the JS SDK.