Hi @gaurav.gupta5,
Thank you for posting.
To connect Amazon QuickSight to an S3 bucket and resolve the error “QuickSight can’t get a list of S3 buckets”, follow and confirm these steps:
Connecting QuickSight to S3
Open the Amazon QuickSight console.
Choose “Manage QuickSight” in the top-right corner.
Select “Security & permissions” from the left menu.
Under “QuickSight 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 QuickSight, 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 “QuickSight 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 QuickSight permissions: Make sure QuickSight has permission to access the S3 bucket as described in the “Connecting QuickSight to S3” section above.
Check bucket policy: If your S3 bucket has a restrictive bucket policy, modify it to allow access from QuickSight. Add the QuickSight 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 QuickSight 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 QuickSight 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 QuickSight.
By following these steps and troubleshooting methods, you should be able to successfully connect QuickSight 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!