-
It couldn't see how to easily access it from aws.Config, or what am I missing please? |
Beta Was this translation helpful? Give feedback.
Answered by
jasdel
Jul 1, 2022
Replies: 2 comments
-
The result, err := client.GetCallerIdentity(ctx, sts.GetCallerIdentityInput{})
fmt.Println(result.Account) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vudh1
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
The
aws.Config
will not provide the Account ID for the credentials being used. the best way to get the Account ID for the credentials, is via STS's GetCallerIdentity operation.