In this article, we review the steps to create a cluster policy for the AWS attribute instance_profile_arn and define it as optional.
This allows you to start a cluster with a specific AWS instance profile. You can also start a cluster without an instance profile.
Create a new cluster policy
- Open your Databricks workspace.
- Click Compute.
- Click Cluster Policies.
- Click Create Cluster Policy.
- Enter a Name for the policy.
- Enter this JSON code in the Definitions field.
{ "aws_attributes.instance_profile_arn": { "type": "allowlist", "values": [ "arn:aws:iam::123456789012:instance-profile/allow-this-role" ], "isOptional": true } }
- Click Permissions.
- Assign the new policy to users in your workspace.
- Click Create.
You can now create a new cluster using the policy.
Edit an existing cluster policy
- Open your Databricks workspace.
- Click Compute.
- Click Cluster Policies.
- Click on an existing policy.
- Click Edit.
- Add this JSON code to the policy in the Definitions field.
{ "aws_attributes.instance_profile_arn": { "type": "allowlist", "values": [ "arn:aws:iam::123456789012:instance-profile/allow-this-role" ], "isOptional": true } }
- Click Permissions.
- Verify that the policy is assigned to the correct users in your workspace.
- Click Update.
You can now create a new cluster using the policy.