Skip to content

Commit

Permalink
Merge pull request #78 from aws-ia/devel
Browse files Browse the repository at this point in the history
Update cleanup config json
  • Loading branch information
gcasilva authored Dec 2, 2023
2 parents a0b3d4c + ba68223 commit dccf995
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 20 additions & 0 deletions scripts/cleanup_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,26 @@
"Type" : "IAM_ROLE",
"Filter" : "sra-management-account-parameters-lambda"
},
{
"Type" : "IAM_ROLE",
"Filter" : "sra-helper-guardduty-lambda-role"
},
{
"Type" : "IAM_ROLE",
"Filter" : "sra-guardduty-codebuild-role"
},
{
"Type" : "IAM_ROLE",
"Filter" : "sra-guardduty-codebuild-lambda-role"
},
{
"Type" : "IAM_ROLE",
"Filter" : "sra-helper-guardduty-codebuild-role"
},
{
"Type" : "IAM_ROLE",
"Filter" : "sra-helper-guardduty-codebuild-lambda-role"
},
{
"Type" : "STACK_SET",
"Filter" : "sra-stackset-execution-role"
Expand Down
1 change: 0 additions & 1 deletion scripts/cleanup_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ def delete_iam_role(item):
print(f"..Deleting inline policy {policy} from role {role_name}.")
iam_session.delete_role_policy(RoleName=role_name, PolicyName=policy)
print(f"....Deleting role {role_name}.")
iam_session
iam_session.delete_role(RoleName=role_name)
except Exception as exe:
if exe.response['Error']['Code'] == 'NoSuchEntity':
Expand Down

0 comments on commit dccf995

Please sign in to comment.