AWS IAM 角色到期
AWS IAM role expiry
IAM 角色到期时:
- 当您需要更长时间时,IAM 角色过期的逻辑是什么。实在看不出来
- 您如何在处理时获得 IAM 角色的扩展而不会出现严重故障?
- 我参加了 IAM 课程,但感觉没有得到很好的解决。
- 例如用于跨账户访问的大规模 运行 AWS EMR Spark 数据管道?
- 如果Spark数据管道已经完成了从S3读取的Stage,那么这个角色就过期了,如果你后续不保存到S3可能也没有关系。
Instance roles如EMR中使用的自动更新:
The application is granted the permissions for the actions and resources that you've defined for the role through the security credentials associated with the role. These security credentials are temporary and we rotate them automatically. We make new credentials available at least five minutes before the expiration of the old credentials.
在 AWS SDK 中查找 com.amazonaws.auth.InstanceProfileCredentialsProvider
;客户端调用它来获取 IAM 凭证。它生成一个线程 com.amazonaws.auth.EC2CredentialsFetcher
,它向提供这些详细信息的特殊 169.x.x.x http 服务器发出 HTTP 请求。每个创建 s3 客户端(或 s3a,在 ASF 构建上)的 spark worker 都将实例化一个 InstanceProfileCredentialsProvider,之后一切都会“正常工作”
IAM 角色过去总是在 1 小时后过期;任何持续 65 分钟以上的工作都会触发刷新。
试试看。
IAM 角色到期时:
- 当您需要更长时间时,IAM 角色过期的逻辑是什么。实在看不出来
- 您如何在处理时获得 IAM 角色的扩展而不会出现严重故障?
- 我参加了 IAM 课程,但感觉没有得到很好的解决。
- 例如用于跨账户访问的大规模 运行 AWS EMR Spark 数据管道?
- 如果Spark数据管道已经完成了从S3读取的Stage,那么这个角色就过期了,如果你后续不保存到S3可能也没有关系。
Instance roles如EMR中使用的自动更新:
The application is granted the permissions for the actions and resources that you've defined for the role through the security credentials associated with the role. These security credentials are temporary and we rotate them automatically. We make new credentials available at least five minutes before the expiration of the old credentials.
在 AWS SDK 中查找 com.amazonaws.auth.InstanceProfileCredentialsProvider
;客户端调用它来获取 IAM 凭证。它生成一个线程 com.amazonaws.auth.EC2CredentialsFetcher
,它向提供这些详细信息的特殊 169.x.x.x http 服务器发出 HTTP 请求。每个创建 s3 客户端(或 s3a,在 ASF 构建上)的 spark worker 都将实例化一个 InstanceProfileCredentialsProvider,之后一切都会“正常工作”
IAM 角色过去总是在 1 小时后过期;任何持续 65 分钟以上的工作都会触发刷新。
试试看。