Skip to content

feat: add manual quarantine option for sandbox accounts#86

Open
chrisns wants to merge 1 commit intoaws-solutions:mainfrom
co-cddo:feature/add-manual-quarantine-account
Open

feat: add manual quarantine option for sandbox accounts#86
chrisns wants to merge 1 commit intoaws-solutions:mainfrom
co-cddo:feature/add-manual-quarantine-account

Conversation

@chrisns
Copy link
Copy Markdown

@chrisns chrisns commented Jan 26, 2026

This PR provides an example implementation for issue #85.

Summary

Adds a "Quarantine" option to the account Actions dropdown, allowing administrators to manually quarantine accounts when issues are detected (e.g., exhausted quotas, suspected compromise, incomplete cleanup).

Changes

  • Backend API: Added POST /accounts/{awsAccountId}/quarantine endpoint with validation (blocks if already Quarantine or CleanUp)
  • API Gateway: Registered quarantine resource under account ID path
  • Frontend Service: Added quarantineAccount() method
  • Frontend Hook: Added useQuarantineAccount() with cache invalidation for accounts and leases
  • UI: Added "Quarantine" item to Actions dropdown with appropriate disabled states

Implementation Notes

This leverages the existing InnovationSandbox.quarantineAccount() business logic, which handles lease termination and OU moves. No changes to core quarantine behaviour were required.

Note to Maintainers

We understand that AWS Solutions' contribution policy means external code isn't merged directly. This PR is offered as a reference implementation to illustrate one possible approach, in case it's helpful as you consider the feature request.

Thank you for your consideration, and for maintaining this project.

Closes #85

Add ability for administrators to manually quarantine accounts from the
accounts list page. This exposes the existing quarantineAccount business
logic via the API and UI.

- Add POST /accounts/{awsAccountId}/quarantine API endpoint
- Add quarantine resource to API Gateway infrastructure
- Add quarantineAccount method to frontend AccountService
- Add useQuarantineAccount hook with cache invalidation
- Add Quarantine option to Actions dropdown in ListAccounts
- Validate: block if status is Quarantine or CleanUp (409)
- Allow: Available, Active, Frozen statuses
@aws-khargita
Copy link
Copy Markdown
Member

As always, thanks for the contribution @chrisns. Will discuss internally but I see this as a simple low effort improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add manual quarantine option for sandbox accounts

2 participants