メインコンテンツまでスキップ

クロスアカウント IAM ロールの作成

このページでは、Zilliz Cloud がプロジェクトのデータプレーンをブートストラップするためのクロスアカウントロールを作成して設定する方法について説明します。このロールにより、Zilliz Cloud はお客様に代わって VPC リソースを管理するための制限付き権限を得ます。

📘注意

Zilliz BYOC は現在、General Availability で利用可能です。アクセス方法および実装の詳細については、Zilliz Cloud 営業チームまでお問い合わせください。

手順

AWS コンソールを使用してブートストラップロールを作成できます。別の方法として、Zilliz Cloud が提供する Terraform スクリプトを使用して、AWS 上の Zilliz Cloud プロジェクト向けインフラストラクチャをブートストラップすることもできます。詳細については、Terraform Provider を参照してください。

ステップ 1: クロスアカウント IAM ロールを作成する

このステップでは、Zilliz Cloud とお客様の VPC 間の通信用にクロスアカウント IAM ロールを作成します。

1

Zilliz Cloud コンソールで、セットアップガイドに表示されている External ID をコピーします。

2

管理者権限を持つユーザーとして AWS Console にログインし、IAM ダッシュボードに移動します。

3

左側のサイドバーで Roles タブをクリックし、次に Create Role をクリックします。

4

Select trusted entity で、AWS account タイルをクリックします。

5

An AWS account で、Another AWS account チェックボックスを選択します。

6

Account ID に、Zilliz Cloud のアカウント ID 965570967084 を入力します。

これは Zilliz Cloud コンソールからコピーした外部 ID ではありません。

7

Require external ID チェックボックスを選択します。

8

External ID に、Zilliz Cloud コンソールからコピーしたものを入力します。

9

Next をクリックし、権限の追加はスキップします。

10

Name, review, and create ステップで、ロールに名前を付け、信頼されたエンティティを確認して、Create role をクリックします。

11

ロールが作成されたら、緑色のバーにある View role をクリックしてロールの詳細に移動します。

12

ロールの ARN の前にあるコピーアイコンをクリックします。

13

Zilliz Cloud コンソールに戻り、EKS settingsIAM Role ARN にロール ARN を貼り付けます。

ステップ 2: 権限を追加する

このステップは AWS コンソール上でのみ行います。このステップでは、上で作成したロールのインラインポリシーを作成します。

1

作成したロールの詳細ページに移動します。Permissions policies セクションで Add permissions をクリックし、Create inline policy を選択します。

2

Specify permissions ページで、Policy editor セクションの JSON をクリックしてポリシーエディターを開きます。次に、以下の権限をコピーしてポリシーエディターに貼り付け、{bucketName}Create S3 Bucket and Role で作成したバケットに置き換えます。

json
{
"Version" : "2012-10-17",
"Statement" : [
{
"Sid" : "CreateOpenIDConnectProvider",
"Effect" : "Allow",
"Action" : [
"iam:CreateOpenIDConnectProvider",
"iam:TagOpenIDConnectProvider"
],
"Resource" : [
"arn:aws:iam::*:oidc-provider/*"
],
"Condition" : {
"StringEquals" : {
"aws:RequestTag/Vendor" : "zilliz-byoc"
}
}
},
{
"Sid" : "DeleteOpenIDConnectProvider",
"Effect" : "Allow",
"Action" : [
"iam:GetOpenIDConnectProvider",
"iam:DeleteOpenIDConnectProvider"
],
"Resource" : [
"arn:aws:iam::*:oidc-provider/*"
]
},
{
"Sid" : "IAMReadEKSRole",
"Effect" : "Allow",
"Action" : [
"iam:GetRole",
"iam:ListAttachedRolePolicies"
],
"Resource" : [
"arn:aws:iam::*:role/zilliz-byoc*",
"arn:aws:iam::*:role/aws-service-role/eks-nodegroup.amazonaws.com/AWSServiceRoleForAmazonEKSNodegroup"
]
},
{
"Sid" : "IAMPassRoleToEKS",
"Effect" : "Allow",
"Action" : [
"iam:PassRole"
],
"Resource" : [
"arn:*:iam::*:role/zilliz-byoc*"
],
"Condition" : {
"StringEquals" : {
"iam:PassedToService" : "eks.amazonaws.com"
}
}
},
{
"Sid" : "IAMUpdateTrustPolicyForEKSRole",
"Effect" : "Allow",
"Action" : [
"iam:UpdateAssumeRolePolicy"
],
"Resource" : [
"arn:*:iam::*:role/zilliz-byoc*"
]
},
{
"Sid" : "EC2Create",
"Effect" : "Allow",
"Action" : [
"ec2:CreateLaunchTemplate",
"ec2:RunInstances"
],
"Resource" : [
"arn:aws:ec2:*:*:launch-template/*",
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:network-interface/*"
],
"Condition" : {
"StringEquals" : {
"aws:RequestTag/Vendor" : "zilliz-byoc"
}
}
},
{
"Sid" : "EC2Update",
"Effect" : "Allow",
"Action" : [
"ec2:DeleteLaunchTemplate",
"ec2:CreateLaunchTemplateVersion",
"ec2:RunInstances"
],
"Resource" : [
"arn:aws:ec2:*:*:launch-template/*",
"arn:aws:ec2:*:*:image/*",
"arn:aws:ec2:*:*:security-group/*",
"arn:aws:ec2:*:*:subnet/*"
],
"Condition" : {
"StringEquals" : {
"aws:ResourceTag/Vendor" : "zilliz-byoc"
}
}
},
{
"Sid" : "EC2RunInstanceOnImage",
"Effect" : "Allow",
"Action" : [
"ec2:RunInstances"
],
"Resource" : [
"arn:aws:ec2:*:*:image/*"
]
},
{
"Sid" : "EC2Tag",
"Effect" : "Allow",
"Action" : [
"ec2:CreateTags"
],
"Resource" : [
"arn:aws:ec2:*:*:launch-template/*",
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:image/*",
"arn:aws:ec2:*:*:network-interface/*",
"arn:aws:ec2:*:*:security-group/*",
"arn:aws:ec2:*:*:subnet/*"
],
"Condition" : {
"StringEquals" : {
"aws:ResourceTag/Vendor" : "zilliz-byoc"
}
}
},
{
"Sid" : "EC2TagWithRequestTag",
"Effect" : "Allow",
"Action" : [
"ec2:CreateTags"
],
"Resource" : [
"arn:aws:ec2:*:*:launch-template/*",
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:image/*",
"arn:aws:ec2:*:*:network-interface/*",
"arn:aws:ec2:*:*:security-group/*",
"arn:aws:ec2:*:*:subnet/*"
],
"Condition" : {
"StringEquals" : {
"aws:RequestTag/Vendor" : "zilliz-byoc"
}
}
},
{
"Sid" : "EC2Read",
"Effect" : "Allow",
"Action" : [
"ec2:DescribeAccountAttributes",
"ec2:DescribeInstanceTypes",
"ec2:DescribeLaunchTemplateVersions",
"ec2:DescribeLaunchTemplates",
"ec2:DescribeSubnets",
"ec2:DescribeVpcs"
],
"Resource" : [
"*"
]
},
{
"Sid" : "EKSCreate",
"Effect" : "Allow",
"Action" : [
"eks:CreateCluster",
"eks:CreateNodegroup",
"eks:CreateAddon",
"eks:CreateAccessEntry",
"eks:CreatePodIdentityAssociation"
],
"Resource" : [
"arn:aws:eks:*:*:cluster/zilliz-byoc-*",
"arn:aws:eks:*:*:addon/zilliz-byoc-*/*/*",
"arn:aws:eks:*:*:nodegroup/zilliz-byoc-*/zilliz*/*",
"arn:aws:eks:*:*:podidentityassociation/zilliz-byoc-*/*",
"arn:aws:eks::aws:access-entry/zilliz-byoc-*/*/*/*/*",
"arn:aws:eks::aws:access-policy/zilliz-byoc-*/*"
],
"Condition" : {
"StringEquals" : {
"aws:RequestTag/Vendor" : "zilliz-byoc"
}
}
},
{
"Sid" : "EKSUpdate",
"Effect" : "Allow",
"Action" : [
"eks:AssociateAccessPolicy",
"eks:UpdateAccessEntry",
"eks:UpdateAddon",
"eks:UpdateClusterConfig",
"eks:UpdateClusterVersion",
"eks:UpdateNodegroupConfig",
"eks:UpdateNodegroupVersion",
"eks:UpdatePodIdentityAssociation"
],
"Resource" : [
"arn:aws:eks:*:*:cluster/zilliz-byoc-*",
"arn:aws:eks:*:*:addon/zilliz-byoc-*/*/*",
"arn:aws:eks:*:*:nodegroup/zilliz-byoc-*/zilliz*/*",
"arn:aws:eks:*:*:podidentityassociation/zilliz-byoc-*/*",
"arn:aws:eks::aws:access-entry/zilliz-byoc-*/*/*/*/*",
"arn:aws:eks::aws:access-policy/zilliz-byoc-*/*"
],
"Condition" : {
"StringEquals" : {
"aws:ResourceTag/Vendor" : "zilliz-byoc"
}
}
},
{
"Sid" : "EKSTag",
"Effect" : "Allow",
"Action" : [
"eks:TagResource"
],
"Resource" : [
"arn:aws:eks:*:*:cluster/zilliz-byoc-*",
"arn:aws:eks:*:*:addon/zilliz-byoc-*/*/*",
"arn:aws:eks:*:*:nodegroup/zilliz-byoc-*/zilliz*/*",
"arn:aws:eks:*:*:podidentityassociation/zilliz-byoc-*/*",
"arn:aws:eks::aws:access-entry/zilliz-byoc-*/*/*/*/*"
]
},
{
"Sid" : "EKSRead",
"Effect" : "Allow",
"Action" : [
"eks:DescribeCluster",
"eks:DescribeNodegroup",
"eks:DescribeAccessEntry",
"eks:DescribeAddon",
"eks:DescribeAddonConfiguration",
"eks:DescribeAddonVersions",
"eks:DescribePodIdentityAssociation",
"eks:DescribeUpdate",
"eks:ListAccessEntries",
"eks:ListAccessPolicies",
"eks:ListAddons",
"eks:ListNodegroups",
"eks:ListUpdates",
"eks:ListPodIdentityAssociations",
"eks:ListTagsForResource"
],
"Resource" : [
"arn:aws:eks:*:*:cluster/zilliz-byoc-*",
"arn:aws:eks:*:*:addon/zilliz-byoc-*/*/*",
"arn:aws:eks:*:*:nodegroup/zilliz-byoc-*/zilliz*/*",
"arn:aws:eks:*:*:podidentityassociation/zilliz-byoc-*/*",
"arn:aws:eks::aws:access-entry/zilliz-byoc-*/*/*/*/*",
"arn:aws:eks::aws:access-policy/zilliz-byoc-*/*"
]
},
{
"Sid" : "EkSDelete",
"Effect" : "Allow",
"Resource" : [
"arn:aws:eks:*:*:cluster/zilliz-byoc-*",
"arn:aws:eks:*:*:addon/zilliz-byoc-*/*/*",
"arn:aws:eks:*:*:nodegroup/zilliz-byoc-*/zilliz*/*",
"arn:aws:eks:*:*:podidentityassociation/zilliz-byoc-*/*",
"arn:aws:eks::aws:access-entry/zilliz-byoc-*/*/*/*/*",
"arn:aws:eks::aws:access-policy/zilliz-byoc-*/*"
],
"Action" : [
"eks:DeleteAccessEntry",
"eks:DeleteAddon",
"eks:DeleteCluster",
"eks:DeleteFargateProfile",
"eks:DeleteNodegroup",
"eks:DeletePodIdentityAssociation"
]
},
{
"Sid" : "S3CheckBucketLocation",
"Effect" : "Allow",
"Action" : [
"s3:GetBucketLocation"
],
"Resource" : "arn:aws:s3:::{bucketName}"
}
]
}
3

Review and create で、ポリシー名を入力し、権限を確認して、Create policy をクリックします。

Ctrl I