Problem
You add cluster tags in the pipeline settings and run the DLT pipeline but the pipeline update fails with a deployment exception error message that cites a tag policy violation.
Example pipeline update error
com.databricks.pipelines.common.errors.deployment.DeploymentException: Failed to launch pipeline cluster <cluster-id>: Attempt to launch cluster with invalid arguments. databricks_error_message: The VM launch request to AWS failed, please check your configuration. [details] TagPolicyViolation: The tag policy does n...
This error is likely due to a misconfiguration in the pipeline.
Check the pipeline cluster configuration and associated cluster policy.
Example cluster error
The VM launch request to AWS failed, please check your configuration. [details] TagPolicyViolation: The tag policy does not allow the specified value for the following tag key: <key-name>. (Service: AmazonEC2; Status Code: 400; Error Code: TagPolicyViolation; Request ID: <request-id>; Proxy: null)
Cause
When running a DLT pipeline, a TagPolicyViolation
error can occur if the tags assigned to the cluster do not comply with the tag policy enforced on your AWS account. Tag policies are used to standardize and control the use of tags across your AWS resources.
Solution
Review the Tag policies in your AWS account and ensure the tags you applied in your pipeline settings adhere to its requirements. This may involve adding, modifying, or removing tags to align with the allowed key-value pairs and formats specified in the policy.
For instance, consider a tag policy in AWS that restricts the Environment
tag key to only accept the values Product
or Development
. In this scenario, any attempt to launch a pipeline cluster with an Environment
tag value other than Product
or Development
would generate a TagPolicyViolation
error. To successfully launch the cluster, you would need to adjust the pipeline settings to ensure you are only using Product
or Development
as the value for the Environment
tag.
If you ensure your pipeline settings are in compliance with your AWS tag policy, you can avoid TagPolicyViolation
errors and ensure smooth pipeline execution.
Example AWS tag policy
{
"tags": {
"Environment": {
"tag_key": {
"@@assign": "Environment"
},
"tag_value": {
"@@assign": [
"Production",
"Development"
]
}
}
}
}