Difference between revisions of "Aws ec2"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 7: Line 7:
  
 
* Create or run an instance
 
* Create or run an instance
:<code>aws ec2 run-instances</code> <ref>https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html</ref>
+
:<code>[[aws ec2 run-instances]]</code> <ref>https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html</ref>
  
 
* Start an EC2 instance:
 
* Start an EC2 instance:

Revision as of 13:41, 12 April 2021

This article is a Draft. Help us to complete it.
  • Get a list of EC2 instances:
aws ec2 describe-instances
  • Get a list of EC2 instances and filter Name, Id and Status:
aws ec2 describe-instances | egrep 'InstanceId|"Name":|"Value":|PublicIp'
  • Create or run an instance
aws ec2 run-instances [1]
  • Start an EC2 instance:
aws ec2 start-instances --instance-ids i-08cf893bbcfd7dc46 (Use your own instance-id)
  • Stop an EC2 instance:
aws ec2 stop-instances --instance-ids i-08cf893bbcfd7dc46 (Use your own instance-id)
  • Show Relational Database Service (RDS) instances:
aws rds describe-db-instances
  • Query and display EC2 metadata: ec2metadata [2] (Distributed in cloud-guest-utils package at least in Debian)


Help

aws ec2

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

aws: error: the following arguments are required: operation

Related terms


See also

  • https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html
  • https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
  • Advertising: