# Error in Creating IAM Role for Glue Job

**URL:** <https://community.deeplearning.ai/t/error-in-creating-iam-role-for-glue-job/697220>\
**Category:** Data Storage and Queries\
**Tags:** week-module-2, coursera-platform\
**Created:** [September 24, 2024, 9:41am UTC](https://community.deeplearning.ai/t/error-in-creating-iam-role-for-glue-job/697220 "2024-09-24T09:41:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![olitanks](https://avatars.discourse-cdn.com/v4/letter/o/ecc23a/32.png) [@olitanks](https://community.deeplearning.ai/u/olitanks)\
**Post date:** [September 24, 2024, 9:41am UTC](https://community.deeplearning.ai/t/error-in-creating-iam-role-for-glue-job/697220/1 "2024-09-24T09:41:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [September 24, 2024, 5:39pm UTC](https://community.deeplearning.ai/t/error-in-creating-iam-role-for-glue-job/697220/2 "2024-09-24T17:39:08Z")

</div>

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.
