StartInstance
Source:
src/AWS/EC2/StartInstance.ts
Runtime binding for the StartInstances operation scoped to the bound
Instance (IAM action ec2:StartInstances on the instance ARN).
Starts the stopped instance — the classic scheduled Lambda that powers dev
boxes on in the morning. Starting an already-running instance succeeds
without effect. Provide the implementation with
Effect.provide(AWS.EC2.StartInstanceHttp).
Instance Lifecycle Control
Section titled “Instance Lifecycle Control”// init — bind the operation to the instanceconst startInstance = yield* AWS.EC2.StartInstance(instance);
// runtime — power the instance onconst result = yield* startInstance();console.log(result.StartingInstances?.[0]?.CurrentState?.Name);