Calling AWSClientRuntime.AWSCredentialsProvider.fromChain() to obtain a credentialsProvider before trying to instantiate any clients causes (in my case) the ECS task to block and doesn't proceed any further. Letting each client get its own credentials provider (which from the code looks like it uses the same command) works as expected.
Context
Running into this issue stops the ECS task from proceeding, causing it to not be able to accept any traffic and eventually fail health checks. A work around is to let the clients create their own credentials provider but this will prevent more advanced use cases.
Environment
AWS Swift SDK version used: 0.1.0
Operating System and version (iOS/macOS/Linux): Amazon Linux 2
Xcode version (if applicable):
Swift compiler version (if applicable): 5.5.1
Swift Tools version (if applicable): 5.5
Reproduction Steps
Create an application that simply tries to create a credentials provider.
Build and deploy to ECS/Fargate
Observed Behavior
The application calls into AWSClientRuntime.AWSCredentialsProvider.fromChain() but doesn't return and continue execution.
@tachyonics - I suspect one of the credential providers is hanging and not completing.
Which credential provider are you attempting to use from the default chain? I suspect one of the credential providers is not returning for some reason.
Can you provide a hello world code sample that we can execute in an AL2 instance?
Description
Calling
AWSClientRuntime.AWSCredentialsProvider.fromChain()
to obtain a credentialsProvider before trying to instantiate any clients causes (in my case) the ECS task to block and doesn't proceed any further. Letting each client get its own credentials provider (which from the code looks like it uses the same command) works as expected.Context
Running into this issue stops the ECS task from proceeding, causing it to not be able to accept any traffic and eventually fail health checks. A work around is to let the clients create their own credentials provider but this will prevent more advanced use cases.
Environment
Reproduction Steps
Observed Behavior
The application calls into
AWSClientRuntime.AWSCredentialsProvider.fromChain()
but doesn't return and continue execution.Expected Behavior
The application completes initialisation.
Possible Solution