Configuring AWS clients through LocalstackContainer
.
#6429
maciejwalkowiak
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Thanks for raising this topic @maciejwalkowiak ! Nowadays, it is true that some Testcontainers modules are providing some utility methods such as LocalStack (using AWS SDK V1), ToxiProxy. However, those have been deprecated due to Testcontainers' responsibility is container initialization and those will be removed in the next major version. How clients are used and built is the users' responsibility, and this is something Testcontainers would help with documentation and examples. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently configuring AWS services pointing to Localstack container is quite cumbersome:
This could be heavily simplified if Localstack container exposed a method
configure(S3Client.builder())
that would set credentials, endpoint and region. Currently I use hand-crafted solution (it does not cover edge cases) that ideally would end up in theLocalstackContainer
:Such
configure
method works with both sync and async clients from AWS SDK v2. Similar one could be added to support AWS SDK v1.The problem is that it
configure
method would need to take a type from AWS SDK which violates the rule:Do you consider any exceptions from this rule or perhaps suggest another way how this issue can be approached?
Beta Was this translation helpful? Give feedback.
All reactions