Skip to content

EC2

myna supports common EC2 instance lifecycle operations and information retrieval.

  • ec2.describe_instances
  • ec2.start_instances
  • ec2.stop_instances
  • ec2.reboot_instances
  • ec2.terminate_instances

Describe Instances (ec2.describe_instances)

Section titled “Describe Instances (ec2.describe_instances)”

Retrieves detailed information about one or more instances.

FieldTypeRequiredDescription
instance_idslistNoA list of instance IDs to describe.
filtersmap[string]listNoFilters to scope the results. Keys are filter names (e.g., instance-state-name), values are lists of allowed strings.
version = "1.0"
kind = "ec2.describe_instances"
[ec2]
filters = { "instance-state-name" = ["running", "pending"], "tag:Environment" = ["production"] }

Manage the power state of your instances.

  • ec2.start_instances: Starts an instance that uses an Amazon EBS volume as its root device.
  • ec2.stop_instances: Stops an Amazon EBS-backed instance.
  • ec2.reboot_instances: Requests a reboot of the specified instances.
  • ec2.terminate_instances: Shuts down the specified instances. This operation is idempotent.
FieldTypeRequiredDescription
instance_idslistYesThe IDs of the instances.
hibernateboolNo(Stop only) Hibernates the instance if the instance was enabled for hibernation at launch.
forceboolNo(Stop only) Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata.
dry_runboolNoChecks whether you have the required permissions for the action, without actually making the request.
version = "1.0"
kind = "ec2.stop_instances"
[ec2]
instance_ids = ["i-1234567890abcdef0", "i-0987654321fedcba0"]
hibernate = true