Error in Creating IAM Role for Glue Job

I encountered this error when apply the terraform scripts for " Week 2 Lab:
Simple Data Lake with AWS Glue":

│ Error: putting IAM Role (Cloud9-de-c3w2lab1-glue-role) Policy (de-c3w2lab1-glue-role-policy): operation error IAM: PutRolePolicy, https response error StatusCode: 403, RequestID: 22a10c68-c6da-49a9-87cd-d8ffa18f3505, api error AccessDenied: User: arn:aws:sts::684410349564:assumed-role/Cloud9InstanceRole/i-00e97bad5d870c1fc is not authorized to perform: iam:PutRolePolicy on resource: role Cloud9-de-c3w2lab1-glue-role because no identity-based policy allows the iam:PutRolePolicy action

│ with aws_iam_role_policy.task_role_policy,
│ on iam_roles.tf line 11, in resource “aws_iam_role_policy” “task_role_policy”:
│ 11: resource “aws_iam_role_policy” “task_role_policy” {

Due to this error, the glue jobs failed and I could not proceed with the rest of the lab.

I believe this is a known issue that the course staff is working on. A fix is expected by the end of the week.

There may be other threads on the forum about this issue.

2 Likes