Difference between revisions of "Aws ec2"
Jump to navigation
Jump to search
↑ https://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html
↑ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
Tags: Mobile web edit, Mobile edit |
|||
Line 19: | Line 19: | ||
* <code>aws ec2 [[export-image]]</code> | * <code>aws ec2 [[export-image]]</code> | ||
* <code>[[aws ec2 terminate-instances]]</code> | * <code>[[aws ec2 terminate-instances]]</code> | ||
− | |||
− | |||
* <code>[[aws ec2 describe-vpcs]]</code> | * <code>[[aws ec2 describe-vpcs]]</code> | ||
* <code>[[aws ec2 describe-images]]</code> | * <code>[[aws ec2 describe-images]]</code> | ||
* <code>[[aws ec2 describe-availability-zones]]</code> | * <code>[[aws ec2 describe-availability-zones]]</code> | ||
+ | |||
+ | [[Key]] management: | ||
+ | * <code>[[aws ec2 describe-key-pairs]]</code> | ||
+ | * <code>[[aws ec2 import-key-pair]]</code> | ||
== Related terms == | == Related terms == |
Revision as of 11:58, 13 September 2021
- Get a list of EC2 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
- 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)
- Query and display EC2 metadata:
ec2metadata
[2] (Distributed incloud-guest-utils
package at least in Debian)
Key management:
Related terms
- AWS CLI
- Ansible Amazon.aws.ec2
- Show Relational Database Service (RDS) instances:
aws rds describe-db-instances
- Terraform resource: aws_instance
See also
- AWS EC2, AWS::EC2,
aws ec2
[describe-instances | describe-instance-status
|run-instances | terminate-instances | stop-instances
|tags
|describe-vpcs
|describe-addresses
|describe-availability-zones
|describe-subnets
|import-key-pair
|create-key-pair
|create-vpc
|create-internet-gateway
|modify-instance-attribute | ec2-instance-connect | get-console-output
]
Advertising: