没有合适的资源?快使用搜索试试~ 我知道了~
首页AWS CLI使用教程
资源详情
资源评论
资源推荐

Amazon Elastic
Compute Cloud
CLI Reference
API Version 2015-10-01

Amazon Elastic Compute Cloud CLI Reference
Amazon Elastic Compute Cloud: CLI Reference
Copyright © 2016 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any
manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other
trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to,
or sponsored by Amazon.

Amazon Elastic Compute Cloud CLI Reference
Table of Contents
Welcome ..................................................................................................................................... 1
Alternative AWS Tools ........................................................................................................... 1
Setting Up the Tools ..................................................................................................................... 3
CLI Tools ............................................................................................................................. 3
Setting Up the CLI Tools (Linux and Mac OS X) ........................................................................ 3
Setting Up the Amazon EC2 CLI Tools on Amazon Linux .................................................... 4
Setting Up the Amazon EC2 CLI Tools on RHEL, Ubuntu, or Mac OS X ................................ 5
Setting Up the CLI Tools (Windows) ...................................................................................... 10
Task 1: Download the Command Line Interface Tools (CLI Tools) ....................................... 11
Task 2: Set the JAVA_HOME Environment Variable ......................................................... 11
Task 3: Set the EC2_HOME Environment Variable and Update the Path Environment
Variable ..................................................................................................................... 12
Task 4: Set the AWS_ACCESS_KEY and AWS_SECRET_KEY Environment Variables .......... 13
Task 5: Set the Region (Optional) .................................................................................. 14
Task 6: Use a Proxy (Optional) ..................................................................................... 15
Task 7: Download Remote Desktop ............................................................................... 15
Verify the Signature (Optional) .............................................................................................. 16
Overview .................................................................................................................... 16
Install the GPG Tools .................................................................................................. 16
Authenticate the Public Key .......................................................................................... 17
Verify the Signature of the Package ............................................................................... 19
Launching an Instance ................................................................................................................. 20
Creating a Key Pair ............................................................................................................. 20
Creating a Security Group .................................................................................................... 21
EC2-Classic ................................................................................................................ 21
EC2-VPC ................................................................................................................... 21
Adding a Rule to Your Security Group .................................................................................... 22
EC2-Classic ................................................................................................................ 22
EC2-VPC ................................................................................................................... 22
Launching an Instance ......................................................................................................... 22
EC2-Classic ................................................................................................................ 23
EC2-VPC ................................................................................................................... 23
Connecting to Your Instance ................................................................................................. 23
List of Commands by Function ...................................................................................................... 24
Commands (CLI Tools) ................................................................................................................ 30
ec2-accept-vpc-peering-connection ........................................................................................ 34
Description ................................................................................................................. 34
Syntax ....................................................................................................................... 34
Options ...................................................................................................................... 34
Common Options ........................................................................................................ 35
Output ....................................................................................................................... 36
Examples ................................................................................................................... 37
Related Topics ............................................................................................................ 37
ec2-allocate-address ............................................................................................................ 37
Description ................................................................................................................. 37
Syntax ....................................................................................................................... 38
Options ...................................................................................................................... 38
Common Options ........................................................................................................ 38
Output ....................................................................................................................... 40
Examples ................................................................................................................... 40
Related Topics ............................................................................................................ 40
ec2-assign-private-ip-addresses ............................................................................................. 41
Description ................................................................................................................. 41
Syntax ....................................................................................................................... 41
Options ...................................................................................................................... 41
API Version 2015-10-01
iii

Amazon Elastic Compute Cloud CLI Reference
Common Options ........................................................................................................ 42
Output ....................................................................................................................... 44
Examples ................................................................................................................... 44
Related Topics ............................................................................................................ 44
ec2-associate-address .......................................................................................................... 45
Description ................................................................................................................. 45
Syntax ....................................................................................................................... 45
Options ...................................................................................................................... 45
Common Options ........................................................................................................ 46
Output ....................................................................................................................... 48
Examples ................................................................................................................... 48
Related Topics ............................................................................................................ 49
ec2-associate-dhcp-options ................................................................................................... 49
Description ................................................................................................................. 49
Syntax ....................................................................................................................... 50
Options ...................................................................................................................... 50
Common Options ........................................................................................................ 50
Output ....................................................................................................................... 52
Examples ................................................................................................................... 52
Related Topics ............................................................................................................ 52
ec2-associate-route-table ...................................................................................................... 53
Description ................................................................................................................. 53
Syntax ....................................................................................................................... 53
Options ...................................................................................................................... 53
Common Options ........................................................................................................ 53
Output ....................................................................................................................... 55
Examples ................................................................................................................... 55
Related Topics ............................................................................................................ 55
ec2-attach-classic-link-vpc .................................................................................................... 56
Description ................................................................................................................. 56
Syntax ....................................................................................................................... 56
Options ...................................................................................................................... 56
Common Options ........................................................................................................ 57
Output ....................................................................................................................... 59
Example .................................................................................................................... 59
Related Topics ............................................................................................................ 59
ec2-attach-internet-gateway .................................................................................................. 60
Description ................................................................................................................. 60
Syntax ....................................................................................................................... 60
Options ...................................................................................................................... 60
Common Options ........................................................................................................ 60
Output ....................................................................................................................... 62
Examples ................................................................................................................... 62
Related Topics ............................................................................................................ 62
ec2-attach-network-interface .................................................................................................. 63
Description ................................................................................................................. 63
Syntax ....................................................................................................................... 63
Options ...................................................................................................................... 63
Common Options ........................................................................................................ 64
Output ....................................................................................................................... 65
Examples ................................................................................................................... 65
Related Topics ............................................................................................................ 66
ec2-attach-volume ............................................................................................................... 66
Description ................................................................................................................. 66
Syntax ....................................................................................................................... 67
Options ...................................................................................................................... 67
Common Options ........................................................................................................ 67
Output ....................................................................................................................... 69
API Version 2015-10-01
iv

Amazon Elastic Compute Cloud CLI Reference
Examples ................................................................................................................... 69
Related Topics ............................................................................................................ 69
ec2-attach-vpn-gateway ........................................................................................................ 70
Description ................................................................................................................. 70
Syntax ....................................................................................................................... 70
Options ...................................................................................................................... 70
Common Options ........................................................................................................ 70
Output ....................................................................................................................... 72
Examples ................................................................................................................... 72
Related Topics ............................................................................................................ 72
ec2-authorize ...................................................................................................................... 73
Description ................................................................................................................. 73
Syntax ....................................................................................................................... 74
Options ...................................................................................................................... 74
Common Options ........................................................................................................ 75
Output ....................................................................................................................... 77
Examples ................................................................................................................... 78
Related Topics ............................................................................................................ 78
ec2-bundle-instance ............................................................................................................. 79
Description ................................................................................................................. 79
Syntax ....................................................................................................................... 79
Options ...................................................................................................................... 79
Common Options ........................................................................................................ 81
Output ....................................................................................................................... 83
Examples ................................................................................................................... 83
Related Topics ............................................................................................................ 84
ec2-cancel-bundle-task ......................................................................................................... 84
Description ................................................................................................................. 84
Syntax ....................................................................................................................... 84
Options ...................................................................................................................... 84
Common Options ........................................................................................................ 85
Output ....................................................................................................................... 86
Examples ................................................................................................................... 87
Related Topics ............................................................................................................ 87
ec2-cancel-conversion-task ................................................................................................... 87
Description ................................................................................................................. 87
Syntax ....................................................................................................................... 87
Options ...................................................................................................................... 88
Common Options ........................................................................................................ 88
Output ....................................................................................................................... 89
Examples ................................................................................................................... 90
Related Topics ............................................................................................................ 90
ec2-cancel-export-task ......................................................................................................... 91
Description ................................................................................................................. 91
Syntax ....................................................................................................................... 91
Options ...................................................................................................................... 91
Common Options ........................................................................................................ 91
Output ....................................................................................................................... 93
Example .................................................................................................................... 93
Related Topics ............................................................................................................ 93
ec2-cancel-reserved-instances-listing ...................................................................................... 94
Description ................................................................................................................. 94
Syntax ....................................................................................................................... 94
Options ...................................................................................................................... 94
Common Options ........................................................................................................ 94
Output ....................................................................................................................... 96
Examples ................................................................................................................... 96
Related Operations ...................................................................................................... 97
API Version 2015-10-01
v
剩余774页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0