- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
We are getting below error when trying to read the table from s3. We are able to create the hive tables pointing to s3 bucket but while reading the table we are facing the issue.
- Labels:
-
Apache Hadoop
-
Apache Hive
Created on ‎12-22-2016 07:30 AM - edited ‎09-16-2022 03:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note: We are not using accessKeyId and SecretKey in hadoop configuration. We have created a policy and attached it to s3 role.
hive> CREATE TABLE `global_param`(
`key` string,
`value` string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '|'
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
's3a:/XXXXXX/XXX/global_param'
TBLPROPERTIES (
'COLUMN_STATS_ACCURATE'='true',
'numFiles'='1',
'numRows'='0',
'rawDataSize'='0',
'totalSize'='1866',
'transient_lastDdlTime'='1463045355');
This returns OK.
hive> select * from global_param;
Failed with exception java.io.IOException:com.amazonaws.services.s3.model.AmazonS3Exception: Status Code: 403, AWS Service: Amazon S3, AWS Request ID: 1AD9B28AF6F67613, AWS Error Code: null, AWS Error Message: Forbidden, S3 Extended Request ID: i2sb9uE02euTHe16iJ+ZEa5BnVsGjUVh+sRigCnQpSTVF+qkATS/rQRst7SUqivikbRTBdUqCX4=
Created ‎12-26-2016 10:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue has been resolved. AWS admin team was able to figure out the problem, they modified the policy and after that we were able to read the table from s3.
Thanks everyone for your help. 🙂
Created ‎12-22-2016 11:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it anon access or IAM policy?. Which version of HDP/Hadoop are you using?. Debug logs would provide details on which credential provider it is trying to use.
Created ‎12-22-2016 11:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Shyam Shaw Is your cluster running on EC2 instances? What S3 access policy did you create?
Created ‎12-26-2016 10:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue has been resolved. AWS admin team was able to figure out the problem, they modified the policy and after that we were able to read the table from s3.
Thanks everyone for your help. 🙂
Created ‎06-07-2017 08:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Shyam Shaw Even I am facing the same error message, even though there are read and write permissions on the bucket. Are there any other permissions which needs to be added on Bucket?
