Skip to content

Commit 4262b5a

Browse files
authored
Merge pull request #182054 from batamig/s3-troubleshooting
s3 troubleshooting
2 parents 484f444 + 7bdbb7c commit 4262b5a

File tree

1 file changed

+80
-7
lines changed

1 file changed

+80
-7
lines changed

articles/purview/register-scan-amazon-s3.md

Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: bagol
66
ms.service: purview
77
ms.subservice: purview-data-map
88
ms.topic: how-to
9-
ms.date: 09/27/2021
9+
ms.date: 12/07/2021
1010
ms.custom: references_regions
1111
# Customer intent: As a security officer, I need to understand how to use the Azure Purview connector for Amazon S3 service to set up, configure, and scan my Amazon S3 buckets.
1212
---
@@ -29,6 +29,7 @@ For this service, use Purview to provide a Microsoft account with secure access
2929
|**Metadata Extraction**| **Full Scan** |**Incremental Scan**|**Scoped Scan**|**Classification**|**Access Policy**|**Lineage**|
3030
|---|---|---|---|---|---|---|
3131
| Yes | Yes | Yes | Yes | Yes | No | Limited** |
32+
|
3233

3334
\** Lineage is supported if dataset is used as a source/sink in [Data Factory Copy activity](how-to-link-azure-data-factory.md)
3435

@@ -87,8 +88,10 @@ Ensure that you've performed the following prerequisites before adding your Amaz
8788
> * [Create a new AWS role for use with Purview](#create-a-new-aws-role-for-purview)
8889
> * [Create a Purview credential for your AWS bucket scan](#create-a-purview-credential-for-your-aws-s3-scan)
8990
> * [Configure scanning for encrypted Amazon S3 buckets](#configure-scanning-for-encrypted-amazon-s3-buckets), if relevant
91+
> * Make sure that your bucket policy does not block the connection. For more information, see [Bucket policy requirements](#confirm-your-bucket-policy-access) and [SCP policy requirements](#confirm-your-scp-policy-access). For these items, you may need to consult with an AWS expert to ensure that your policies allow required access.
9092
> * When adding your buckets as Purview resources, you'll need the values of your [AWS ARN](#retrieve-your-new-role-arn), [bucket name](#retrieve-your-amazon-s3-bucket-name), and sometimes your [AWS account ID](#locate-your-aws-account-id).
9193
94+
9295
### Create a Purview account
9396

9497
- **If you already have a Purview account,** you can continue with the configurations required for AWS S3 support. Start with [Create a Purview credential for your AWS bucket scan](#create-a-purview-credential-for-your-aws-s3-scan).
@@ -97,16 +100,19 @@ Ensure that you've performed the following prerequisites before adding your Amaz
97100

98101
### Create a new AWS role for Purview
99102

100-
This procedure describes how to locate the values for your Azure Account ID and External ID, create your AWS role, and then enter the value for your role ARN in Purview.
103+
The Purview scanner is deployed in a Microsoft account in AWS. To allow the Purview scanner to read your S3 data, you must create a dedicated role in the AWS portal, in the IAM area, to be used by the scanner.
104+
105+
This procedure describes how to create the AWS role, with the required Microsoft Account ID and External ID from Purview, and then enter the Role ARN value in Purview.
106+
101107

102108
**To locate your Microsoft Account ID and External ID**:
103109

104110
1. In Purview, go to the **Management Center** > **Security and access** > **Credentials**.
105111

106112
1. Select **New** to create a new credential.
107113

108-
In the **New credential** pane that appears on the right, in the **Authentication method** dropdown, select **Role ARN**.
109-
114+
In the **New credential** pane that appears on the right, in the **Authentication method** dropdown, select **Role ARN**.
115+
110116
Then copy the **Microsoft account ID** and **External ID** values that appear to a separate file, or have them handy for pasting into the relevant field in AWS. For example:
111117

112118
[ ![Locate your Microsoft account ID and External ID values.](./media/register-scan-amazon-s3/locate-account-id-external-id.png) ](./media/register-scan-amazon-s3/locate-account-id-external-id.png#lightbox)
@@ -153,12 +159,18 @@ This procedure describes how to locate the values for your Azure Account ID and
153159
- In the **Role description** box, enter an optional description to identify the role's purpose
154160
- In the **Policies** section, confirm that the correct policy (**AmazonS3ReadOnlyAccess**) is attached to the role.
155161

156-
Then select **Create role** to complete the process.
157-
158-
For example:
162+
Then select **Create role** to complete the process. For example:
159163

160164
![Review details before creating your role.](./media/register-scan-amazon-s3/review-role.png)
161165

166+
**Extra required configurations**:
167+
168+
- For buckets that use **AWS-KMS** encryption, [special configuration](#configure-scanning-for-encrypted-amazon-s3-buckets) is required to enable scanning.
169+
170+
- Make sure that your bucket policy does not block the connection. For more information, see:
171+
172+
- [Confirm your bucket policy access](#confirm-your-bucket-policy-access)
173+
- [Confirm your SCP policy access](#confirm-your-scp-policy-access)
162174

163175
### Create a Purview credential for your AWS S3 scan
164176

@@ -248,6 +260,25 @@ AWS buckets support multiple encryption types. For buckets that use **AWS-KMS**
248260

249261
![View an updated Summary page with the new policy attached to your role.](./media/register-scan-amazon-s3/attach-policy-role.png)
250262

263+
### Confirm your bucket policy access
264+
265+
Make sure that the S3 bucket [policy](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-iam-policies.html) does not block the connection:
266+
267+
1. In AWS, navigate to your S3 bucket, and then select the **Permissions** tab > **Bucket policy**.
268+
1. Check the policy details to make sure that it doesn't block the connection from the Purview scanner service.
269+
270+
### Confirm your SCP policy access
271+
272+
Make sure that there is no [SCP policy](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) that blocks the connection to the S3 bucket.
273+
274+
For example, your SCP policy might block read API calls from the [AWS scanning region](#storage-and-scanning-regions).
275+
276+
- Required API calls, which must be allowed by your SCP policy, include: `AssumeRole`, `GetBucketLocation`, `GetObject`, `ListBucket`, `GetBucketPublicAccessBlock`.
277+
- Your SCP policy must also allow calls to the **us-east-1** AWS Region, which is the default Region for API calls. For more information, see the [AWS documentation](https://docs.aws.amazon.com/general/latest/gr/rande.html).
278+
279+
Follow the [SCP documentation](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_create.html), review your organization’s SCP policies, and make sure all the [permissions required for the Purview scanner](#create-a-new-aws-role-for-purview) are available.
280+
281+
251282
### Retrieve your new Role ARN
252283

253284
You'll need to record your AWS Role ARN and copy it in to Purview when [creating a scan for your Amazon S3 bucket](#create-a-scan-for-one-or-more-amazon-s3-buckets).
@@ -518,6 +549,48 @@ Make sure to define your resource with a wildcard. For example:
518549
}
519550
```
520551

552+
## Troubleshooting
553+
554+
Scanning Amazon S3 resources requires [creating a role in AWS IAM](#create-a-new-aws-role-for-purview) to allow the Purview scanner service running in a Microsoft account in AWS to read the data.
555+
556+
Configuration errors in the role can lead to connection failure. This section describes some examples of connection failures that may occur while setting up the scan, and the troubleshooting guidelines for each case.
557+
558+
If all of the items described in the following sections are properly configured, and scanning S3 buckets still fails with errors, contact Microsoft support.
559+
560+
> [!NOTE]
561+
> For policy access issues, make sure that neither your bucket policy, nor your SCP policy are blocking access to your S3 bucket from Purview.
562+
>
563+
>For more information, see [Confirm your bucket policy access](#confirm-your-bucket-policy-access) and [Confirm your SCP policy access](#confirm-your-scp-policy-access).
564+
>
565+
### Bucket is encrypted with KMS
566+
567+
Make sure that the AWS role has **KMS Decrypt** permissions. For more information, see [Configure scanning for encrypted Amazon S3 buckets](#configure-scanning-for-encrypted-amazon-s3-buckets).
568+
569+
### AWS role is missing an external ID
570+
571+
Make sure that the AWS role has the correct external ID:
572+
573+
1. In the AWS IAM area, select the **Role > Trust relationships** tab.
574+
1. Follow the steps in [Create a new AWS role for Purview](#create-a-new-aws-role-for-purview) again to verify your details.
575+
576+
### Error found with the role ARN
577+
578+
This is a general error that indicates an issue when using the Role ARN. For example, you may want to troubleshoot as follows:
579+
580+
- Make sure that the AWS role has the required permissions to read the selected S3 bucket. Required permissions include `AmazonS3ReadOnlyAccess` or the [minimum read permissions](#minimum-permissions-for-your-aws-policy), and `KMS Decrypt` for encrypted buckets.
581+
582+
- Make sure that the AWS role has the correct Microsoft account ID. In the AWS IAM area, select the **Role > Trust relationships** tab and then follow the steps in [Create a new AWS role for Purview](#create-a-new-aws-role-for-purview) again to verify your details.
583+
584+
For more information, see [Cannot find the specified bucket](#cannot-find-the-specified-bucket),
585+
586+
### Cannot find the specified bucket
587+
588+
Make sure that the S3 bucket URL is properly defined:
589+
590+
1. In AWS, navigate to your S3 bucket, and copy the bucket name.
591+
1. In Purview, edit the Amazon S3 data source, and update the bucket URL to include your copied bucket name, using the following syntax: `s3://<BucketName>`
592+
593+
521594
## Next steps
522595

523596
Learn more about Azure Purview Insight reports:

0 commit comments

Comments
 (0)