步骤 2:启动登录区 - AWS Control Tower

步骤 2:启动登录区

AWS Control Tower CreateLandingZone API 需要登录区版本和清单文件作为输入参数。您可以使用清单文件来配置以下功能:

编译清单文件后,您就可以开始创建新的登录区。

注意

使用 API 配置和启动登录区时,AWS Control Tower 不支持区域拒绝控制。使用 API 成功启动您的登录区后,您可以使用 AWS Control Tower 控制台来配置区域拒绝控制

  1. 调用 AWS Control Tower CreateLandingZone API。此 API 需要登录区版本和清单文件作为输入。

    aws controltower create-landing-zone --landing-zone-version 3.3 --manifest "file://LandingZoneManifest.json"

    LandingZoneManifest.json 清单示例:

    { "governedRegions": ["us-west-2","us-west-1"], "organizationStructure": { "security": { "name": "CORE" }, "sandbox": { "name": "Sandbox" } }, "centralizedLogging": { "accountId": "222222222222", "configurations": { "loggingBucket": { "retentionDays": 60 }, "accessLoggingBucket": { "retentionDays": 60 }, "kmsKeyArn": "arn:aws:kms:us-west-1:123456789123:key/e84XXXXX-6bXX-49XX-9eXX-ecfXXXXXXXXX" }, "enabled": true }, "securityRoles": { "accountId": "333333333333" }, "accessManagement": { "enabled": true } }
    注意

    如该示例中所示,CentralizedLogging 和 SecurityRoles 账户的 AccountId 不得相同。

    输出

    { "arn": "arn:aws:controltower:us-west-2:123456789012:landingzone/1A2B3C4D5E6F7G8H", "operationIdentifier": "55XXXXXX-e2XX-41XX-a7XX-446XXXXXXXXX" }
  2. 调用 GetLandingZoneOperation API 以检查 CreateLandingZone 操作的状态。GetLandingZoneOperation API 返回以下状态SUCCEEDEDFAILEDIN_PROGRESS

    aws controltower get-landing-zone-operation --operation-identifier "55XXXXXX-eXXX-4XXX-aXXX-44XXXXXXXXXX"

    输出

    { "operationDetails": { "operationType": "CREATE", "startTime": "Thu Nov 09 20:39:19 UTC 2023", "endTime": "Thu Nov 09 21:02:01 UTC 2023", "status": "SUCCEEDED" } }
  3. 当返回 SUCCEEDED 状态时,您可以调用 GetLandingZone API 以查看登录区配置。

    aws controltower get-landing-zone --landing-zone-identifier "arn:aws:controltower:us-west-2:123456789123:landingzone/1A2B3C4D5E6F7G8H"

    输出

    { "landingZone": { "arn": "arn:aws:controltower:us-west-2:123456789012:landingzone/1A2B3C4D5E6F7G8H", "driftStatus": { "status": "IN_SYNC" }, "latestAvailableVersion": "3.3", "manifest": { "accessManagement": { "enabled": true }, "securityRoles": { "accountId": "333333333333" }, "governedRegions": [ "us-west-1", "eu-west-3", "us-west-2" ], "organizationStructure": { "sandbox": { "name": "Sandbox" }, "security": { "name": "Security" } }, "centralizedLogging": { "accountId": "222222222222", "configurations": { "loggingBucket": { "retentionDays": 60 }, "kmsKeyArn": "arn:aws:kms:us-west-1:123456789123:key/e84XXXXX-6bXX-49XX-9eXX-ecfXXXXXXXXX", "accessLoggingBucket": { "retentionDays": 60 } }, "enabled": true } }, "status": "PROCESSING", "version": "3.3" } }