feat: add AWS EC2 power management and get instance components#5008
Merged
Conversation
|
👋 Commands for maintainers:
|
aa72b83 to
fc9789e
Compare
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
7c8255d to
9bb8a6f
Compare
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9432f98. Configure here.
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
forestileao
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Resolves: #5006
What changed
Adds two AWS EC2 workflow components:
Get Instance — describe an EC2 instance and emit its current state, IP addresses, and metadata
Manage Instance Power — perform a power operation on an EC2 instance (start, stop, reboot, or hibernate) and wait for the expected terminal state
Why
SuperPlane already had EC2 AMI actions (create/get/copy image, etc.) and instance provisioning (create/delete), but no way to inspect a running instance mid-workflow or change its power state
How
Backend
Added GetInstance in pkg/integrations/aws/ec2/get_instance.go. Setup resolves the instance name via DescribeInstance and stores it alongside the instance ID in node metadata so the UI card shows both.
Added ManageInstancePower in pkg/integrations/aws/ec2/manage_instance_power.go with four operations: start (polls until running), stop (polls until stopped), hibernate (sends StopInstances?Hibernate=true, polls until stopped), and reboot (fire-and-forget, emits immediately since the instance stays running throughout).
Added RebootInstances and HibernateInstances (via a stopInstances helper with a Hibernate flag) to the EC2 client in pkg/integrations/aws/ec2/client.go.
Registered both components in pkg/integrations/aws/aws.go.
Added example outputs, tests, and updated ec2.go / example.go.
Frontend
Added workflow v2 mappers:
web_src/src/pages/workflowv2/mappers/aws/ec2/get_instance.ts — metadata card shows resolved instance name, raw instance ID (when a name was found), and region
web_src/src/pages/workflowv2/mappers/aws/ec2/manage_instance_power.ts — metadata card shows instance name, operation label (Start / Stop / Reboot / Hibernate), and region; execution details include the operation and final state
Registered mappers and event state registries in web_src/src/pages/workflowv2/mappers/aws/index.ts
Added mapper specs for both components (get_instance.spec.ts, manage_instance_power.spec.ts)
Demo
Screencast.From.2026-05-28.14-17-12.webm