AWS 身份联合是一项允许用户在 AWS 中使用外部身份验证服务进行身份验证的功能。通过与 AWS 组织结构一起使用,可以通过 SSO 为多个 AWS 账户提供用户访问控制。以下是一个使用 AWS 身份联合和 AWS 组织结构的示例:
aws sso-admin create-instance --instance-name "test-aws-federation"
aws sso-admin create-identity-provider --instance-arn {SSOInstanceARN} --type SAML --name "Test SAML Provider" --idp-metadata "file://idp-metadata.xml" --tags Key=Test,Value=SSO
aws organizations create-organization --feature-set ALL
aws organizations create-account --email example@test.com --account-name "Test Account" --iam-user-access-to-billing ALLOW --tags Key=Test,Value=Organization
aws organizations create-organizational-unit --parent-id {ParentOUId} --name "Test OU"
aws organizations move-account --source-parent-id {ParentOUId} --destination-parent-id {NewParentOUId} --account-id {AccountId}
aws organizations create-account-assignment --target-id {AccountId} --policy-id {ServiceControlPolicyId} --iam-user-access-to-billing ALLOW --roles "arn:aws:iam::{IAMAccount}:role/{RoleName}" --principal-type AWS_SSO --principal-id {SSOPrincipalId}
下一篇:AWS身份验证和日志记录