capabilities.work

Deprovision a Secured Instance

A 3-step recipe with Amazon EC2. We can help you get access.

Recipe · 3 steps

Deprovision a Secured Instance

with Amazon EC2 · Cybersecurity Management

Terminate an instance and reclaim its security group once it is gone.

  1. Terminate the target instance.
  2. Describe the instance and branch on its state, looping while shutting-down and proceeding once it reports terminated.
  3. Delete the now-unreferenced security group.
What you'll need to have ready
  • instanceId: The ID of the instance to terminate.
  • groupId: The ID of the security group to delete after termination.
For your developer

Arazzo workflow amazon-ec2:deprovision-secured-instance, 3 operations: TerminateInstances → DescribeInstances → DeleteSecurityGroup. Specs on APIs.io.