Skip to content

BatchComputeEnvironment IAM role is deleted before the environment #674

@wayneworkman

Description

@wayneworkman

I'm opening this issue based on findings from a colleague. I can retrieve additional information as is necessary. Below is from my colleague:

In every invocation of aws-nuke against an environment that contains at least one AWS Batch Compute resource, in all cases, the tool has removed the Batch Compute's IAM role before fully deleting the compute environment. When this happens, the Batch Compute resource cannot be deleted, as this activity is delegated to AWS Batch, and without an appropriate role, the delete activity fails.

The logs will present repeated messages like the following:
{"level":"info","msg":"waiting for removal","name":"NAME REMOVED","owner":"us-east-1","state":"waiting","state_code":5,"time":"2025-04-04T15:41:30-05:00","type":"BatchComputeEnvironment"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions