Amazon web services 通过fargate上的eks获取aws帐户id

Amazon web services 通过fargate上的eks获取aws帐户id,amazon-web-services,amazon-eks,aws-fargate,Amazon Web Services,Amazon Eks,Aws Fargate,在Fargate上的aws EKS上运行应用程序时,我希望以编程方式获取我的aws帐户id 在EC2实例上,我只需调用http://169.254.169.254/latest/dynamic/instance-identity/document但我不能在fargate上 我可以在不使用aws sts get caller identity的情况下获取帐户id吗 谢谢你的帮助

在Fargate上的aws EKS上运行应用程序时,我希望以编程方式获取我的aws帐户id

在EC2实例上,我只需调用
http://169.254.169.254/latest/dynamic/instance-identity/document
但我不能在fargate上

我可以在不使用aws sts get caller identity的情况下获取帐户id吗

谢谢你的帮助