Capstone Project Part 2: Error in roles when executing the first job

Capstone Project Part 2: role problems when executing the first job.

After executing these three commands:

terraform apply -target=module.extract_job
terraform apply -target=module.transform_job
terraform apply -target=module.serving

When I try to execute the job:

aws glue start-job-run --job-name glue_api_users_extract_job | jq -r '.JobRunId'

I got the following error:

An error occurred (AccessDeniedException) when calling the StartJobRun operation: User: arn:aws:sts::616740859302:assumed-role/voclabs/user4079447=uopdalubyaxc is not authorized to perform: glue:StartJobRun on resource: arn:aws:glue:us-east-1:616740859302:job/glue_api_users_extract_job because no identity-based policy allows the glue:StartJobRun action

Anyone can help, this is way too annoying.

You have to use the value of the output variable: glue_api_users_extract_job not the variable name.

Dear Hawraa…it’s me…again (sorry). Still, I think the explanations in the labs are confusing, however I am now in the last lab. What exactly is meant by output variables with respect to the glue jobs? Because I tried it with the part after “value” and I still got the error…

Hey Johannes :slight_smile:

If you run terraform output in the command line, you should see the actual value assigned to the glue jobs. So when you run the command terraform output, you should get something like this one:

glue_api_users_extract_job = some_value_here

What you have on the right side is what you need to use to run the glue job.