Step 3: Add an S3 IAM role to the EC2 policy
This article outlines how to add your new IAM role to the EC2 instance policy. Before you complete these steps, make sure to note the IAM role used to create the Databricks deployment, because this is the role you will be editing.
Locate the IAM role that created the Databricks deployment
If you don’t know which IAM role created the Databricks deployment, do the following:
As an acount admin, log in to the account console.
Go to Workspaces and click your workspace name.
In the Credentials box, note the role name at the end of the Role ARN.
For example, in the Role ARN arn:aws:iam::123456789123:role/finance-prod
, the role name is finance-prod
.
Add the S3 IAM role to the EC2 policy
In the AWS console, go to the IAM service.
Click the Roles tab in the sidebar.
Click the role that created the Databricks deployment.
On the Permissions tab, click the policy.
Click Edit Policy.
Append the following block to the end of the
Statement
array. Ensure that you don’t overwrite any of the existing policy. Replace<iam-role-for-s3-access>
with the role you created in Step 1: Create an instance profile:{ "Effect": "Allow", "Action": "iam:PassRole", "Resource": "arn:aws:iam::<aws-account-id-databricks>:role/<iam-role-for-s3-access>" }
Click Review policy.
Click Save changes.
Next steps
After you modify the instance policy, you can add the instance profile to your Databricks workspace. See Step 4: Add an instance profile to Databricks.