Testing for AWS credentials is a straightforward operation.
Using get-caller-identity
There is a single API call that will always work regardless of permissions: GetCallerIdentity
|
|
Output:
|
|
The Arn
value depends on the type of credentials, but mostly includes the human-friendly name.
In addition, checking the status is reliable: 0
for success, 255
for failure.