MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / start_instance

Method start_instance

scripts/agents/devops/src/aws/ec2.py:195–211  ·  view source on GitHub ↗

Start a stopped EC2 instance. Args: instance_id: The ID of the instance to start. wait: Whether to wait for the instance to be running. Returns: Updated instance details.

(self, instance_id: str, wait: bool = True)

Source from the content-addressed store, hash-verified

193
194 @aws_operation("start_instance")
195 def start_instance(self, instance_id: str, wait: bool = True) -> Dict[str, Any]:
196 """
197 Start a stopped EC2 instance.
198
199 Args:
200 instance_id: The ID of the instance to start.
201 wait: Whether to wait for the instance to be running.
202
203 Returns:
204 Updated instance details.
205 """
206 self.client.start_instances(InstanceIds=[instance_id])
207
208 if wait:
209 self.wait_for('instance_running', {'InstanceIds': [instance_id]})
210
211 return self.get_instance(instance_id)
212
213 @aws_operation("stop_instance")
214 def stop_instance(

Callers 3

handle_ec2_commandFunction · 0.95
resize_instanceMethod · 0.95
test_instance_lifecycleFunction · 0.80

Calls 2

get_instanceMethod · 0.95
wait_forMethod · 0.80

Tested by 1

test_instance_lifecycleFunction · 0.64