Global InfraGlobal Infra Cloud
aws

ec2

CLI reference for ec2 (aws).

gi aws ec2

Subcommands

CommandDescription
gi aws ec2 get <id>Get a ec2.
gi aws ec2 listList ec2.
gi aws ec2 createCreate a new ec2.
gi aws ec2 update <id>Update a ec2.
gi aws ec2 delete <id>Delete a ec2.
gi aws ec2 generate_uid <id>Generate unique id cross region/platform for ec2 asset.
gi aws ec2 screenshot <id>This action captures a screenshot of the asset and returns the URL of the screenshot.
gi aws ec2 status <id>This action retrieves the current status of the ec2 instance.
gi aws ec2 stop <id>This action stop the ec2 instance.

Flags

list flags

FlagAliasDescription
--filter-fFilter assets (e.g. attributes.name=my-asset)

create flags

FlagAliasDescription
--file—Path to a YAML or JSON file describing the asset

update flags

FlagAliasDescription
--file—Path to a YAML or JSON file with updated attributes

Examples

# List all
gi aws ec2 list

# Get by id
gi aws ec2 get <id>

# Filter by attribute
gi aws ec2 list -f attributes.name=my-value

# Create from file
gi aws ec2 create --file asset.yaml

# Update
gi aws ec2 update <id> --file asset.yaml

# Delete
gi aws ec2 delete <id>

# Generate_uid
gi aws ec2 generate_uid <id>

# Screenshot
gi aws ec2 screenshot <id>

# Status
gi aws ec2 status <id>

# Stop
gi aws ec2 stop <id>

Usage Notes

On this page