Skip to content

Commit dccf995

Browse files
authored
Merge pull request #78 from aws-ia/devel
Update cleanup config json
2 parents a0b3d4c + ba68223 commit dccf995

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

scripts/cleanup_config.json

+20
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,26 @@
150150
"Type" : "IAM_ROLE",
151151
"Filter" : "sra-management-account-parameters-lambda"
152152
},
153+
{
154+
"Type" : "IAM_ROLE",
155+
"Filter" : "sra-helper-guardduty-lambda-role"
156+
},
157+
{
158+
"Type" : "IAM_ROLE",
159+
"Filter" : "sra-guardduty-codebuild-role"
160+
},
161+
{
162+
"Type" : "IAM_ROLE",
163+
"Filter" : "sra-guardduty-codebuild-lambda-role"
164+
},
165+
{
166+
"Type" : "IAM_ROLE",
167+
"Filter" : "sra-helper-guardduty-codebuild-role"
168+
},
169+
{
170+
"Type" : "IAM_ROLE",
171+
"Filter" : "sra-helper-guardduty-codebuild-lambda-role"
172+
},
153173
{
154174
"Type" : "STACK_SET",
155175
"Filter" : "sra-stackset-execution-role"

scripts/cleanup_config.py

-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ def delete_iam_role(item):
468468
print(f"..Deleting inline policy {policy} from role {role_name}.")
469469
iam_session.delete_role_policy(RoleName=role_name, PolicyName=policy)
470470
print(f"....Deleting role {role_name}.")
471-
iam_session
472471
iam_session.delete_role(RoleName=role_name)
473472
except Exception as exe:
474473
if exe.response['Error']['Code'] == 'NoSuchEntity':

0 commit comments

Comments
 (0)