My first attempt at completing the first capstone assignment got stuck while trying to create the IAM role for the extract glue job:
module.extract_job.aws_iam_role.glue_role: Still creating…
I let this go for about 30 minutes before killing it. I tried doing terraform destroy and then re-init, but then ran into the following error:
Error: creating IAM Role (Cloud9-de-c4w4a1-glue-role): operation error IAM: CreateRole, https response error StatusCode: 409, RequestID: 267d5a6a-0c69-4942-a435-b748cbe11c79, EntityAlreadyExists: Role with name Cloud9-de-c4w4a1-glue-role already exists.
Is this going to require a lab reset? Did I miss something in the instructions that led to my initial issue of the glue_role seeming to be in an infinite loop?
Hello @mmcgonag
Sorry for the inconvenience. I think the issue must be resolved in the next fresh lab session that you start. Please, let us know if the issue persists.
I am getting similar issue and wondering there is a fix. Thanks in advance.
Error: creating IAM Role (de-c4w4a1-glue-role): operation error IAM: CreateRole, https response error StatusCode: 409, RequestID: d073dfce-782d-4aeb-afcc-1288b39a743d, EntityAlreadyExists: Role with name de-c4w4a1-glue-role already exists.
with module.extract_job.aws_iam_role.glue_role,
on modules/extract_job/iam.tf line 1, in resource “aws_iam_role” “glue_role”:
1: resource “aws_iam_role” “glue_role” {
Hello @tedcheng
Please, request a lab refresh via this form. It should fix your issue.
I was able to resolve this issue by deleting the role policy, role and RDS connection using the following commands in the terminal:
First, get the policy name:
aws iam list-role-policies --role-name de-c4w4a1-glue-role
Then delete the policy:
aws iam delete-role-policy --role-name de-c4w4a1-glue-role --policy-name
Delete the role:
aws iam delete-role --role-name de-c4w4a1-glue-role
Delete the connection:
aws glue delete-connection --connection-name de-c4w4a1-connection-rds
Then apply the cd terraform, init, plan and apply commands.