本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
使用 AWS Security Token Service
AWS Security Token Service (AWS STS) 可帮助您为 IAM 用户申请临时的、权限有限的证书。
重要
要使 AWS 服务在 Snowball Edge 上正常运行,必须允许服务使用端口。有关更多信息,请参阅 在 AWS Snowball 边缘设备上使用 AWS 服务所需的端口。
在 Snowball Edge 上使用 AWS CLI 和 API 操作
使用 AWS CLI 或 API 操作在 Snowball Edge 设备上发出 IAM AWS STS、、Amazon S3 和 Amazon EC2 命令时,必须将指定region
为 “。” snow
您可以使用命令本身AWS configure
或在命令本身内执行此操作,如以下示例所示。
aws configure --profile snowballEdge AWS Access Key ID [None]: defgh AWS Secret Access Key [None]: 1234567 Default region name [None]: snow Default output format [None]: json
Or
aws iam list-users --profile snowballEdge --endpoint http://192.0.2.0:6078 --region snow
注意
在 AWS Snowball Edge 上本地使用的访问密钥 ID 和访问机密密钥不能与中的密钥互换。 AWS Cloud
Snowball Edge 上支持的 AWS STSAWS CLI 命令
在本地仅支持 assume-role 命令。
对于 assume-role
,支持以下参数:
role-arn
role-session-name
duration-seconds
示例命令
要代入角色,请使用以下命令。
aws sts assume-role --role-arn
"arn:aws:iam::123456789012:role/example-role"
--role-session-nameAWSCLI-Session
--endpointhttp://snow-device-IP-address
:7078
有关使用 assume-role
命令的更多信息,请参阅如何使用 AWS CLI代入 IAM 角色?
有关使用的更多信息 AWS STS,请参阅 IAM 用户指南中的使用临时安全证书。
支持 AWS STS 的 API 操作
本地仅支持 AssumeRoleAPI。
对于 AssumeRole
,支持以下参数:
RoleArn
RoleSessionName
DurationSeconds
示例
要代入角色,请使用以下命令。
https://sts.amazonaws.com/ ?Version=2011-06-15 &Action=AssumeRole &RoleSessionName=session-example &RoleArn=arn:aws:iam::123456789012:role/demo &DurationSeconds=3600