I am trying to clean up resources for my organization account using this AWS-Nuke Script
Here, How I have done using AWS Console,
- I have created an organization and added few member accounts in it.
- From Github repository, In aws-nuke-config.yaml , I have added my main account ID in blacklist.
- Then Uploaded this file in S3 Bucket.
- Created a stack using NukeStack.yaml and given ParentOuId from Organization
- Bucket Name mytestbucket1234
- AssumeRoleName as NukeRole
After this in Cloud Watch I modified schedule for 10minutes, In CloudTrail it says StartBuild AccessDenied.
"errorCode": "AccessDenied",
"errorMessage": "User: arn:aws:sts::myAccountID:assumed-role/CloudWatchNukeScriptSchedule-nuke/91b9068c9b993c148bc0a29fb9275767 is not authorized to perform: codebuild:StartBuild on resource: arn:aws:codebuild:us-east-2:myAccountID:project/AccountNuker-nuke",
Can anyone tell me where I am missing in the setup?