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
(→Create) |
|||
(19 intermediate revisions by 4 users not shown) | |||
Line 15: | Line 15: | ||
:<code>[[aws ec2 start-instances]] --instance-ids i-08cf893bbcfd7dc46</code> (Use your own instance-id) | :<code>[[aws ec2 start-instances]] --instance-ids i-08cf893bbcfd7dc46</code> (Use your own instance-id) | ||
* Stop an EC2 instance: | * Stop an EC2 instance: | ||
− | :<code>aws ec2 stop-instances --instance-ids i-08cf893bbcfd7dc46</code> (Use your own instance-id) | + | :<code>[[aws ec2 stop-instances]] --instance-ids i-08cf893bbcfd7dc46</code> (Use your own instance-id) |
* Query and display EC2 metadata: <code>ec2metadata</code> <ref>https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html</ref> (Distributed in <code>cloud-guest-utils</code> package at least in Debian) | * Query and display EC2 metadata: <code>ec2metadata</code> <ref>https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html</ref> (Distributed in <code>cloud-guest-utils</code> package at least in Debian) | ||
Line 28: | Line 28: | ||
Volumes: | Volumes: | ||
* <code>[[aws ec2 describe-volumes]]</code> | * <code>[[aws ec2 describe-volumes]]</code> | ||
+ | * <code>[[aws ec2 create-volume]]</code> | ||
+ | * <code>[[aws ec2 modify-volume]]</code> | ||
+ | * <code>[[aws ec2 detach-volume]]</code> | ||
[[Key]] management: | [[Key]] management: | ||
Line 42: | Line 45: | ||
* <code>[[aws ec2 create-vpc]]</code> | * <code>[[aws ec2 create-vpc]]</code> | ||
* <code>[[aws ec2 describe-vpcs]]</code> | * <code>[[aws ec2 describe-vpcs]]</code> | ||
+ | |||
+ | [[AWS VPC peering]] | ||
+ | * <code>[[aws ec2 create-vpc-peering-connection]]</code> | ||
+ | * <code>[[aws ec2 describe-vpc-peering-connections]]</code> | ||
+ | * <code>[[aws ec2 accept-vpc-peering-connection]]</code> | ||
[[Subnet]] | [[Subnet]] | ||
* <code>[[aws ec2 create-subnet]]</code> | * <code>[[aws ec2 create-subnet]]</code> | ||
+ | * <code>[[aws ec2 describe-subnets]]</code> | ||
+ | |||
+ | [[NAT]] | ||
+ | * <code>[[aws ec2 create-nat-gateway]]</code> | ||
+ | |||
[[Security Group]] | [[Security Group]] | ||
Line 56: | Line 69: | ||
* <code>[[create-key-pair]]</code> | * <code>[[create-key-pair]]</code> | ||
* <code>[[create-vpn-connection]]</code> | * <code>[[create-vpn-connection]]</code> | ||
− | < | + | * <code>[[create-route]]</code> |
− | create-capacity-reservation | + | * <code>[[aws ec2 run-instances]]</code> |
− | create-capacity-reservation-fleet | + | * <code>[[aws rds create-db-instance]]</code> |
− | create-carrier-gateway | + | |
− | create-client-vpn-endpoint | + | create-capacity-reservation |
− | create-client-vpn-route | + | create-capacity-reservation-fleet |
− | create-customer-gateway | + | create-carrier-gateway |
− | create-default-subnet | + | create-client-vpn-endpoint |
− | create-default-vpc | + | create-client-vpn-route |
− | create-dhcp-options | + | create-customer-gateway |
− | create-egress-only-internet-gateway | + | create-default-subnet |
− | create-fleet | + | create-default-vpc |
− | create-flow-logs | + | create-dhcp-options |
− | create-fpga-image | + | create-egress-only-internet-gateway |
− | create-image | + | create-fleet |
− | create-instance-event-window | + | create-flow-logs |
− | create-instance-export-task | + | create-fpga-image |
− | create-internet-gateway | + | create-image |
− | create-ipam | + | create-instance-event-window |
− | create-ipam-pool | + | create-instance-export-task |
− | create-ipam-scope | + | create-internet-gateway |
− | create-key-pair | + | create-ipam |
− | create-launch-template | + | create-ipam-pool |
− | create-launch-template-version | + | create-ipam-scope |
− | create-local-gateway-route | + | create-key-pair |
− | create-local-gateway-route-table-vpc-association | + | create-launch-template |
− | create-managed-prefix-list | + | create-launch-template-version |
− | create-nat-gateway | + | create-local-gateway-route |
− | create-network-acl | + | create-local-gateway-route-table-vpc-association |
− | create-network-acl-entry | + | create-managed-prefix-list |
− | create-network-insights-access-scope | + | create-nat-gateway |
− | create-network-insights-path | + | create-network-acl |
− | create-network-interface | + | create-network-acl-entry |
− | create-network-interface-permission | + | create-network-insights-access-scope |
− | create-placement-group | + | create-network-insights-path |
− | create-public-ipv4-pool | + | create-network-interface |
− | create-replace-root-volume-task | + | create-network-interface-permission |
− | create-reserved-instances-listing | + | create-placement-group |
− | create-restore-image-task | + | [[create-public-ipv4-pool]] |
− | create-route | + | create-replace-root-volume-task |
− | create-route-table | + | create-reserved-instances-listing |
− | create-security-group | + | create-restore-image-task |
− | create-snapshot | + | [[create-route]] |
− | create-snapshots | + | [[create-route-table]] |
− | create-spot-datafeed-subscription | + | [[create-security-group]] |
− | create-store-image-task | + | create-snapshot |
− | create-subnet | + | create-snapshots |
− | create-subnet-cidr-reservation | + | create-spot-datafeed-subscription |
− | create-tags | + | create-store-image-task |
− | create-traffic-mirror-filter | + | create-subnet |
− | create-traffic-mirror-filter-rule | + | create-subnet-cidr-reservation |
− | create-traffic-mirror-session | + | create-tags |
− | create-traffic-mirror-target | + | create-traffic-mirror-filter |
− | create-transit-gateway | + | create-traffic-mirror-filter-rule |
− | create-transit-gateway-connect | + | create-traffic-mirror-session |
− | create-transit-gateway-connect-peer | + | create-traffic-mirror-target |
− | create-transit-gateway-multicast-domain | + | create-transit-gateway |
− | create-transit-gateway-peering-attachment | + | create-transit-gateway-connect |
− | create-transit-gateway-prefix-list-reference | + | create-transit-gateway-connect-peer |
− | create-transit-gateway-route | + | create-transit-gateway-multicast-domain |
− | create-transit-gateway-route-table | + | create-transit-gateway-peering-attachment |
− | create-transit-gateway-vpc-attachment | + | create-transit-gateway-prefix-list-reference |
− | create-volume | + | create-transit-gateway-route |
− | create-vpc | + | create-transit-gateway-route-table |
− | create-vpc-endpoint | + | create-transit-gateway-vpc-attachment |
− | create-vpc-endpoint-connection-notification | + | create-volume |
− | create-vpc-endpoint-service-configuration | + | create-vpc |
− | create-vpc-peering-connection | + | [[create-vpc-endpoint]] |
− | create-vpn-connection | + | create-vpc-endpoint-connection-notification |
− | create-vpn-connection-route | + | create-vpc-endpoint-service-configuration |
− | create-vpn-gateway | + | [[create-vpc-peering-connection]] |
− | + | create-vpn-connection | |
+ | create-vpn-connection-route | ||
+ | create-vpn-gateway | ||
== Related terms == | == Related terms == | ||
Line 136: | Line 151: | ||
* <code>[[aws ec2 vpn]]</code> | * <code>[[aws ec2 vpn]]</code> | ||
* <code>[[aws ecs]]</code> | * <code>[[aws ecs]]</code> | ||
+ | * [[delete-security-group]] | ||
+ | * [[Load Balancer]]: <code>[[aws elbv2]]</code> | ||
== See also == | == See also == |
Latest revision as of 08:54, 24 October 2023
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/index.html
- 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)
Volumes:
Key management:
aws ec2 create-vpc-peering-connection
aws ec2 describe-vpc-peering-connections
aws ec2 accept-vpc-peering-connection
Create[edit]
create-vpc
create-subnet
create-nat-gateway
create-key-pair
create-vpn-connection
create-route
aws ec2 run-instances
aws rds create-db-instance
create-capacity-reservation create-capacity-reservation-fleet create-carrier-gateway create-client-vpn-endpoint create-client-vpn-route create-customer-gateway create-default-subnet create-default-vpc create-dhcp-options create-egress-only-internet-gateway create-fleet create-flow-logs create-fpga-image create-image create-instance-event-window create-instance-export-task create-internet-gateway create-ipam create-ipam-pool create-ipam-scope create-key-pair create-launch-template create-launch-template-version create-local-gateway-route create-local-gateway-route-table-vpc-association create-managed-prefix-list create-nat-gateway create-network-acl create-network-acl-entry create-network-insights-access-scope create-network-insights-path create-network-interface create-network-interface-permission create-placement-group create-public-ipv4-pool create-replace-root-volume-task create-reserved-instances-listing create-restore-image-task create-route create-route-table create-security-group create-snapshot create-snapshots create-spot-datafeed-subscription create-store-image-task create-subnet create-subnet-cidr-reservation create-tags create-traffic-mirror-filter create-traffic-mirror-filter-rule create-traffic-mirror-session create-traffic-mirror-target create-transit-gateway create-transit-gateway-connect create-transit-gateway-connect-peer create-transit-gateway-multicast-domain create-transit-gateway-peering-attachment create-transit-gateway-prefix-list-reference create-transit-gateway-route create-transit-gateway-route-table create-transit-gateway-vpc-attachment create-volume create-vpc create-vpc-endpoint create-vpc-endpoint-connection-notification create-vpc-endpoint-service-configuration create-vpc-peering-connection create-vpn-connection create-vpn-connection-route create-vpn-gateway
Related terms[edit]
- AWS CLI
- Ansible Amazon.aws.ec2
- Show Relational Database Service (RDS) instances:
aws rds describe-db-instances
- Terraform resource: aws_instance
aws ec2 vpn
aws ecs
- delete-security-group
- Load Balancer:
aws elbv2
See also[edit]
aws ec2 [ create-vpc | create-subnet | create-nat-gateway | create-key-pair | create-vpn-connection | create-route | create-route-table | create-vpc-endpoint ]
- 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: