<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Workspace deployment on AWS - CloudFormation Issue in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31205#M22702</link>
    <description>&lt;P&gt;The cross-account IAM role was created properly with this policy&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "ec2:AllocateAddress",
                "ec2:AssociateDhcpOptions",
                "ec2:AssociateIamInstanceProfile",
                "ec2:AssociateRouteTable",
                "ec2:AttachInternetGateway",
                "ec2:AttachVolume",
                "ec2:AuthorizeSecurityGroupEgress",
                "ec2:AuthorizeSecurityGroupIngress",
                "ec2:CancelSpotInstanceRequests",
                "ec2:CreateDhcpOptions",
                "ec2:CreateInternetGateway",
                "ec2:CreateKeyPair",
                "ec2:CreateNatGateway",
                "ec2:CreatePlacementGroup",
                "ec2:CreateRoute",
                "ec2:CreateRouteTable",
                "ec2:CreateSecurityGroup",
                "ec2:CreateSubnet",
                "ec2:CreateTags",
                "ec2:CreateVolume",
                "ec2:CreateVpc",
                "ec2:CreateVpcEndpoint",
                "ec2:DeleteDhcpOptions",
                "ec2:DeleteInternetGateway",
                "ec2:DeleteKeyPair",
                "ec2:DeleteNatGateway",
                "ec2:DeletePlacementGroup",
                "ec2:DeleteRoute",
                "ec2:DeleteRouteTable",
                "ec2:DeleteSecurityGroup",
                "ec2:DeleteSubnet",
                "ec2:DeleteTags",
                "ec2:DeleteVolume",
                "ec2:DeleteVpc",
                "ec2:DeleteVpcEndpoints",
                "ec2:DescribeAvailabilityZones",
                "ec2:DescribeIamInstanceProfileAssociations",
                "ec2:DescribeInstanceStatus",
                "ec2:DescribeInstances",
                "ec2:DescribeInternetGateways",
                "ec2:DescribeNatGateways",
                "ec2:DescribePlacementGroups",
                "ec2:DescribePrefixLists",
                "ec2:DescribeReservedInstancesOfferings",
                "ec2:DescribeRouteTables",
                "ec2:DescribeSecurityGroups",
                "ec2:DescribeSpotInstanceRequests",
                "ec2:DescribeSpotPriceHistory",
                "ec2:DescribeSubnets",
                "ec2:DescribeVolumes",
                "ec2:DescribeVpcs",
                "ec2:DetachInternetGateway",
                "ec2:DisassociateIamInstanceProfile",
                "ec2:DisassociateRouteTable",
                "ec2:ModifyVpcAttribute",
                "ec2:ReleaseAddress",
                "ec2:ReplaceIamInstanceProfileAssociation",
                "ec2:ReplaceRoute",
                "ec2:RequestSpotInstances",
                "ec2:RevokeSecurityGroupEgress",
                "ec2:RevokeSecurityGroupIngress",
                "ec2:RunInstances",
                "ec2:TerminateInstances"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow",
            "Sid": "Stmt1403287045000"
        },
        {
            "Condition": {
                "StringLike": {
                    "iam:AWSServiceName": "spot.amazonaws.com"
                }
            },
            "Action": [
                "iam:CreateServiceLinkedRole",
                "iam:PutRolePolicy"
            ],
            "Resource": [
                "arn:aws:iam::*:role/aws-service-role/spot.amazonaws.com/AWSServiceRoleForEC2Spot"
            ],
            "Effect": "Allow"
        }
    ]
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But it does not seem to have any bearing for S3 access, and the Lambda function that fails does not seem to depend in any way on this particular Role. The CloudFormation templates associates a different role to the CopyZips Lambda that includes the following policy&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::databricks-prod-public-cfts/*"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::databricks-workspace-stack-lambdazipsbucket/*"
            ],
            "Effect": "Allow"
        }
    ]
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jan 2022 12:09:08 GMT</pubDate>
    <dc:creator>mihai</dc:creator>
    <dc:date>2022-01-26T12:09:08Z</dc:date>
    <item>
      <title>Workspace deployment on AWS - CloudFormation Issue</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31202#M22699</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to deploy a workspace on AWS using the quickstart feature, and I have been running into a problem where the stack fails when trying to create&amp;nbsp;a resource.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;The following resource(s) failed to create: [CopyZips].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;From the CloudWatch logs I have gathered that the&amp;nbsp;issue lies with a Lambda function that seems to call a CopyObject operation.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;copy_source: {'Bucket': 'databricks-prod-public-cfts', 'Key': 'functions/packages/default-cluster/lambda.zip'}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Which fails with an AccessDenied Error as I do not seem&amp;nbsp;to have access to that bucket from my AWS account.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;[ERROR] 2022-01-21T15:48:42.138Z b49f0923-0c8b-4893-bf77-ae559c7fde88 Exception: An error occurred (AccessDenied) when calling the CopyObject operation: Access Denied
Traceback (most recent call last):
 File "/var/task/index.py", line 42, in handler
  copy_objects(source_bucket, dest_bucket, prefix, objects)
 File "/var/task/index.py", line 17, in copy_objects
  s3.copy_object(CopySource=copy_source, Bucket=dest_bucket,
 File "/var/runtime/botocore/client.py", line 386, in _api_call
  return self._make_api_call(operation_name, kwargs)
 File "/var/runtime/botocore/client.py", line 705, in _make_api_call
  raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access Denied&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If I am not mistaken, the&amp;nbsp;&lt;B&gt;databricks-prod-public-cfts&lt;/B&gt;&amp;nbsp;bucket is managed by Databricks, and AWS users should be able to access it for sourcing the resources needed towards deploying a Databricks workspace, yet I do not appear to have access after creating my Databricks account.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 18:43:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31202#M22699</guid>
      <dc:creator>mihai</dc:creator>
      <dc:date>2022-01-21T18:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Workspace deployment on AWS - CloudFormation Issue</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31203#M22700</link>
      <description>&lt;P&gt;Hi there! My name is Piper, and I'm a moderator for the Databricks community. I apologize for my delayed response! Let's give it a bit longer to see what the community has to say before we come back to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Hubert Dudek​&amp;nbsp;or @Werner Stinckens​&amp;nbsp;- Can either of y'all help?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 16:21:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31203#M22700</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-25T16:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Workspace deployment on AWS - CloudFormation Issue</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31204#M22701</link>
      <description>&lt;P&gt;can you check the cross-account IAM role?  According to the quickstart this is pretty important&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 21:13:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31204#M22701</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2022-01-25T21:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Workspace deployment on AWS - CloudFormation Issue</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31205#M22702</link>
      <description>&lt;P&gt;The cross-account IAM role was created properly with this policy&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "ec2:AllocateAddress",
                "ec2:AssociateDhcpOptions",
                "ec2:AssociateIamInstanceProfile",
                "ec2:AssociateRouteTable",
                "ec2:AttachInternetGateway",
                "ec2:AttachVolume",
                "ec2:AuthorizeSecurityGroupEgress",
                "ec2:AuthorizeSecurityGroupIngress",
                "ec2:CancelSpotInstanceRequests",
                "ec2:CreateDhcpOptions",
                "ec2:CreateInternetGateway",
                "ec2:CreateKeyPair",
                "ec2:CreateNatGateway",
                "ec2:CreatePlacementGroup",
                "ec2:CreateRoute",
                "ec2:CreateRouteTable",
                "ec2:CreateSecurityGroup",
                "ec2:CreateSubnet",
                "ec2:CreateTags",
                "ec2:CreateVolume",
                "ec2:CreateVpc",
                "ec2:CreateVpcEndpoint",
                "ec2:DeleteDhcpOptions",
                "ec2:DeleteInternetGateway",
                "ec2:DeleteKeyPair",
                "ec2:DeleteNatGateway",
                "ec2:DeletePlacementGroup",
                "ec2:DeleteRoute",
                "ec2:DeleteRouteTable",
                "ec2:DeleteSecurityGroup",
                "ec2:DeleteSubnet",
                "ec2:DeleteTags",
                "ec2:DeleteVolume",
                "ec2:DeleteVpc",
                "ec2:DeleteVpcEndpoints",
                "ec2:DescribeAvailabilityZones",
                "ec2:DescribeIamInstanceProfileAssociations",
                "ec2:DescribeInstanceStatus",
                "ec2:DescribeInstances",
                "ec2:DescribeInternetGateways",
                "ec2:DescribeNatGateways",
                "ec2:DescribePlacementGroups",
                "ec2:DescribePrefixLists",
                "ec2:DescribeReservedInstancesOfferings",
                "ec2:DescribeRouteTables",
                "ec2:DescribeSecurityGroups",
                "ec2:DescribeSpotInstanceRequests",
                "ec2:DescribeSpotPriceHistory",
                "ec2:DescribeSubnets",
                "ec2:DescribeVolumes",
                "ec2:DescribeVpcs",
                "ec2:DetachInternetGateway",
                "ec2:DisassociateIamInstanceProfile",
                "ec2:DisassociateRouteTable",
                "ec2:ModifyVpcAttribute",
                "ec2:ReleaseAddress",
                "ec2:ReplaceIamInstanceProfileAssociation",
                "ec2:ReplaceRoute",
                "ec2:RequestSpotInstances",
                "ec2:RevokeSecurityGroupEgress",
                "ec2:RevokeSecurityGroupIngress",
                "ec2:RunInstances",
                "ec2:TerminateInstances"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow",
            "Sid": "Stmt1403287045000"
        },
        {
            "Condition": {
                "StringLike": {
                    "iam:AWSServiceName": "spot.amazonaws.com"
                }
            },
            "Action": [
                "iam:CreateServiceLinkedRole",
                "iam:PutRolePolicy"
            ],
            "Resource": [
                "arn:aws:iam::*:role/aws-service-role/spot.amazonaws.com/AWSServiceRoleForEC2Spot"
            ],
            "Effect": "Allow"
        }
    ]
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But it does not seem to have any bearing for S3 access, and the Lambda function that fails does not seem to depend in any way on this particular Role. The CloudFormation templates associates a different role to the CopyZips Lambda that includes the following policy&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::databricks-prod-public-cfts/*"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::databricks-workspace-stack-lambdazipsbucket/*"
            ],
            "Effect": "Allow"
        }
    ]
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 12:09:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31205#M22702</guid>
      <dc:creator>mihai</dc:creator>
      <dc:date>2022-01-26T12:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Workspace deployment on AWS - CloudFormation Issue</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31206#M22703</link>
      <description>&lt;P&gt;Could you please add   CopyObject to the policy and see if that ease out the issue &lt;/P&gt;&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Sat, 12 Feb 2022 16:28:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31206#M22703</guid>
      <dc:creator>Atanu</dc:creator>
      <dc:date>2022-02-12T16:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Workspace deployment on AWS - CloudFormation Issue</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31208#M22705</link>
      <description>&lt;P&gt;Hi  @Mihai Morar​&amp;nbsp; @Kaniz Fatma​&amp;nbsp; did you manage to solve this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting exactly the same error (Access Denied error in the CopyZips Lambda) when when creating the stack through the Quickstart, although the &lt;B&gt;databricks-prod-public-cfts &lt;/B&gt;should be managed by Databricks and the rest of resources and permissions are created automatically by the template. &lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 08:15:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31208#M22705</guid>
      <dc:creator>destepa</dc:creator>
      <dc:date>2022-03-16T08:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Workspace deployment on AWS - CloudFormation Issue</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31210#M22707</link>
      <description>&lt;P&gt;Hey there @Mihai Morar​&amp;nbsp; and @Daniel Estepa​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you guys are doing well. Just wanted to check in if you guys were able to resolve your issue or do you need more help? &lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 16:39:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31210#M22707</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-27T16:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Workspace deployment on AWS - CloudFormation Issue</title>
      <link>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31211#M22708</link>
      <description>&lt;P&gt;&lt;I&gt;Dropping by with my experience in case anyone lands here via Google.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the&amp;nbsp;&lt;B&gt;databricks-prod-public-cfts &lt;/B&gt;bucket is located in &lt;B&gt;us-west-2.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your AWS organisation has an &lt;A href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html" alt="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html" target="_blank"&gt;SCP&lt;/A&gt; which whitelists specific regions (such as &lt;A href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_general.html#example-scp-deny-region" alt="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_general.html#example-scp-deny-region" target="_blank"&gt;this example&lt;/A&gt;) and &lt;B&gt;us-west-2 &lt;/B&gt;is not included, then the &lt;B&gt;CopyObject&lt;/B&gt; action from the &lt;B&gt;databricks-prod-public-cfts &lt;/B&gt;bucket in the &lt;B&gt;CopyZips &lt;/B&gt;stage will fail. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of adding &lt;B&gt;us-west-2 &lt;/B&gt;to our list of whitelisted regions, I added &lt;B&gt;s3:CopyObject&lt;/B&gt; to the &lt;B&gt;NotAction &lt;/B&gt;list of exempt actions in the example SCP policy above. Then the SCP permits copying objects from a bucket in any region.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCP errors manifest much in the same way as IAM errors, making them difficult to debug!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an ideal world maybe Databricks would provide a mirror of this bucket in each region they operate in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 13:16:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/workspace-deployment-on-aws-cloudformation-issue/m-p/31211#M22708</guid>
      <dc:creator>GarethGraphy</dc:creator>
      <dc:date>2022-06-08T13:16:37Z</dc:date>
    </item>
  </channel>
</rss>

