Error: F_JG290D AccessDenied for GetBucketLocation
Issue
When configuring a Databricks target location with Amazon S3 as the Integrate Staging Directory, the location connection test fails with the following errors:
F_JG290D: Received status code 403 (Forbidden). AWS S3 error [Code:AccessDenied. Message: User is not authorized to perform: s3:GetBucketLocation on resource: arn:aws:s3:::<bucket-name> because no resource-based policy allows the s3:GetBucketLocation action.]F_JG0557: The previous error occurred during request [POST /latest/hubs/<hub_name>/new_loc/test].
Environment
- HVR 6
- Target: Databricks
- Staging: Amazon S3
Resolution
To resolve this issue:
- Log in to the HVR 6 web UI.
- Open the affected replication channel.
- Go to the Actions configuration of the channel.
- Add an Environment action with the following parameters:
Replace
<s3_bucket_region>with the actual value, such asus-west-2. - Save the configuration.
- Activate the channel to apply the changes.
- Start the Refresh job.
- Verify that data loads successfully into Databricks.
Validate the bootstrap region
To verify the AWS identity and bucket region, run the following commands on the HVR host:
- Check which AWS identity HVR uses:
aws sts get-caller-identity - Get the region of your S3 bucket:For a bucket in
aws s3api get-bucket-location \ --bucket <bucket-name>us-west-2, the output looks like this:{ "LocationConstraint": "us-west-2" } - Confirm that
LocationConstraintmatches the value ofHVR_S3_BOOTSTRAP_REGION.
If the regions match and the error persists, review the IAM role, bucket policy, and effective AWS permissions for the identity returned in step 1.
For more information, see Staging for Databricks.
Cause
This issue occurs when the HVR Databricks target connection test tries to determine the AWS S3 bucket region using the GetBucketLocation operation and the request fails.
HVR normally connects to us-east-1 initially to determine the S3 bucket region. The HVR_S3_BOOTSTRAP_REGION setting instructs HVR to use the S3 bucket's actual region for the bootstrap operation instead of the default us-east-1.