How i can connect my S3 Bucket in Amazon quicksight

Hi @gaurav.gupta5,

Thank you for posting.

To connect Amazon Quick Sight to an S3 bucket and resolve the error “Quick Sight can’t get a list of S3 buckets”, follow and confirm these steps:

Connecting Quick Sight to S3

Open the Amazon Quick Sight console.
Choose “Manage Quick Sight” in the top-right corner.
Select “Security & permissions” from the left menu.
Under “Quick Sight access to AWS services”, choose “Manage”.
Select “Amazon S3” from the list of services.
Choose “Select S3 buckets” and select the specific bucket you want to connect to.
Click “Finish” and then “Update” to save the changes.

Creating an S3 Data Source

In Quick Sight, go to “Datasets” and click “New dataset”.
Choose “S3” as the data source.
Provide a data source name.
Upload a manifest file or enter the S3 URI for your data.
Click “Connect” to create the data source.

Resolving “Quick Sight can’t get a list of S3 buckets” Error

Check IAM permissions: Ensure your IAM user or role has the necessary permissions to access S3. Add the following actions to your IAM policy:

{
  "Effect": "Allow",
  "Action": [
    "s3:ListAllMyBuckets",
    "s3:GetBucketLocation",
    "s3:ListBucket",
    "s3:GetObject"
  ],
  "Resource": "*"
}

Verify Quick Sight permissions: Make sure Quick Sight has permission to access the S3 bucket as described in the “Connecting Quick Sight to S3” section above.
Check bucket policy: If your S3 bucket has a restrictive bucket policy, modify it to allow access from Quick Sight. Add the Quick Sight service role ARN to the policy:

{
  "Effect": "Allow",
  "Principal": {
    "AWS": "arn:aws:iam::YOUR_ACCOUNT_ID:role/service-role/aws-quicksight-service-role-v0"
  },
  "Action": [
    "s3:GetBucketLocation",
    "s3:ListBucket",
    "s3:GetObject"
  ],
  "Resource": [
    "arn:aws:s3:::YOUR_BUCKET_NAME",
    "arn:aws:s3:::YOUR_BUCKET_NAME/*"
  ]
}

Encryption: If your S3 data is encrypted with AWS KMS, grant the Quick Sight service role access to the KMS key:

aws kms create-grant --key-id YOUR_KMS_KEY_ARN --grantee-principal YOUR_QUICKSIGHT_SERVICE_ROLE_ARN --operations Decrypt

Region check: Ensure that Quick Sight and the S3 bucket are in the same AWS region.
VPC endpoints: If you’re using VPC endpoints for S3, make sure they’re correctly configured to allow access from Quick Sight.
By following these steps and troubleshooting methods, you should be able to successfully connect Quick Sight to your S3 bucket and resolve any permission-related issues.

Regards,
Demola

Hi @gaurav.gupta5,
It’s been awhile since we last heard from you, did you have any additional questions regarding your post or was the solution provided above help with your case?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!