I can't access my Amazon Simple Storage Service (Amazon S3) table from the Hue (Hadoop User Experience) web interface of an Amazon EMR cluster. I get an error message similar to this: "Failed to access path: 's3a://path' Check that you have access to read this bucket and that the region is correct: Bad Request."

This error usually occurs when you try to access an S3 bucket that is not in the us-east-1 Region. To access S3 tables in the Hue web interface, create an external Hive table on S3. Update the region parameter in the hue.ini file to match the Region of the S3 bucket, and then restart Hue.


 'date' string,
 url STRING,
 expandedUrl STRING,
 domain STRING
PARTITIONED BY ('year' INT, 'month' INT,
    'day' INT)
STORED AS PARQUET LOCATION 's3://bucket-name/new/';

Check the Hue configuration

By default, Amazon EMR sets the Hue region parameter to us-east-1. To access an S3 table that is in a Region other than us-east-1, modify hue.ini:

1.    Uncomment the region parameter.

sudo sed -i '/region/s/^##//g' /etc/hue/conf/hue.ini

2.    Set the region parameter to the Region that your bucket is in. In the following example, the bucket is in eu-west-1.

sudo sed -i '/region/s,us-east-1,eu-west-1,' /etc/hue/conf/hue.ini

Restart Hue

1.    Run the following command to restart Hue.

sudo stop hue ; sudo start hue

2.    Close and reopen the HUE web interface, and then try to access the S3 table. You can now access the table.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2019-03-19