• Type: Sub-task
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.7.0
    • Component/s: fs/s3
    • Labels:
    • Target Version/s:


      One big advantage provided by the s3a filesystem is the ability to use an IAM instance profile in order to authenticate when attempting to access an S3 bucket from an EC2 instance. This eliminates the need to deploy AWS account credentials to the instance or to provide them to Hadoop via the fs.s3a.awsAccessKeyId and fs.s3a.awsSecretAccessKey params.

      The patch submitted to resolve HADOOP-10714 breaks this behavior by using the S3Credentials class to read the value of these two params. The change in question is presented below:, lines 161-170:

          // Try to get our credentials or just connect anonymously
          S3Credentials s3Credentials = new S3Credentials();
          s3Credentials.initialize(name, conf);
          AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
              new BasicAWSCredentialsProvider(s3Credentials.getAccessKey(),
              new InstanceProfileCredentialsProvider(),
              new AnonymousAWSCredentialsProvider()

      As you can see, the getAccessKey() and getSecretAccessKey() methods from the S3Credentials class are now used to provide constructor arguments to BasicAWSCredentialsProvider. These methods will raise an exception if the fs.s3a.awsAccessKeyId or fs.s3a.awsSecretAccessKey params are missing, respectively. If a user is relying on an IAM instance profile to authenticate to an S3 bucket and therefore doesn't supply values for these params, they will receive an exception and won't be able to access the bucket.


        1. HADOOP-11670.002.patch
          2 kB
          Adam Budde
        2. HADOOP-11670-001.patch
          1 kB
          Thomas Demoor
        3. HADOOP-11670-003.patch
          4 kB
          Steve Loughran

          Issue Links



              • Assignee:
                budde Adam Budde
                budde Adam Budde
              • Votes:
                0 Vote for this issue
                5 Start watching this issue


                • Created: