1

I am trying to use my bucket to give the arguments for the EMR to create a cluster for it is giving me "All access to this object has been disabled (Service: Amazon S3; Status Code: 403; Error Code: AllAccessDisabled;"

I have used my Reducer and Mapper python files and my bucket's permission is public too

is there something wrong with my mapper and reducer files or am I missing a trick here

Ryan Terry
  • 11
  • 1
  • Is there any code or configuration you can provide to show what you've tried? – spamguy Jun 21 '19 at 23:26
  • #!/usr/bin/env python import sys # input comes from STDIN (standard input) for line in sys.stdin: # it trims the whitespace for our first step line = line.strip() #Words are more like an array of the words now words = line.split() # increase counters for word in words: # write the results to STDOUT (standard output); # what we output here will be the input for the # Reduce step, i.e. the input for reducer.py # # tab-delimited; the trivial word count is 1 print '%s\t%s' % (word, 1) – Ryan Terry Jun 22 '19 at 01:13

1 Answers1

0

Make sure you've assigned your EMR cluster an IAM role that has adequate S3 access permissions. IAM enables you to grant permissions to users, groups, or resources (like your EMR cluster, in this instance) to be able to access other services or resources in AWS (like S3, which is currently giving you an access denied error).

To do this through EMRFS:

  • Navigate to the EMR console
  • click Security configurations (on left menu)
  • Scroll down to IAM roles for EMRFS
  • Enable Use IAM roles for EMRFS requests to Amazon S3
  • Add role mapping
    • Select desired IAM role (Admin)
    • Select whatever basis for access you prefer (User, group, or S3 bucket name prefix)

Here's a pic of what it looks like in console: enter image description here

More on this available in the docs here: https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles.html https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-emrfs-iam-roles.html

Nick Walsh
  • 1,807
  • 5
  • 16