-
Notifications
You must be signed in to change notification settings - Fork 637
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
Our ECS containers are deployed in an account A and we are setting the following credentials file to allow the sdk clients access resources in another account B.
[crossaccount]
role_arn = ***** (arn of the role in account B)
credential_source = EcsContainer
Everything works fine until at some point, the sdk clients start assuming the role of the ECS container instead of the one configured in the credential files.

All the clients are singletons created on the application bootstrap and using the default configuration. This may seem as a problem happening on the session expiration/renew but it is really hard to prove. We encountered this issue few times now with the lambda client and the event bridge client.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.12.2
Reproduction Steps
The issue is not reproducible with code
Observed Behavior
SDK clients assuming the role of the ECS container.
Expected Behavior
SDK clients assuming the role configured in the credentials file.
Possible Solution
No response
Additional Information/Context
No response