ebook img

Amazon EC2 Command Line Tools - docs.aws.amazon.com PDF

800 Pages·2016·5.18 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Amazon EC2 Command Line Tools - docs.aws.amazon.com

Amazon Elastic Compute Cloud CLI Reference D E T A C E R P E D Amazon Elastic Compute Cloud: CLI Reference Copyright © 2017 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. Amazon Elastic Compute Cloud CLI Reference 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. D E T A C E R P E D The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. 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) ....................................................D....................................... 15 Task 7: Download Remote Desktop ..................................................................................... 15 Verify the Signature (Optional) .................................................................................................. 16 E Overview......................................................................................................................... 16 Install the GPG Tools ........................................................................................................ 16 T Authenticate the Public Key ............................................................................................... 17 Verify the Signature of the Package ................................................................................... 19 Launching an Instance ......................................................A................................................................ 20 Creating a Key Pair................................................................................................................... 20 Creating a Security Group ................................C......................................................................... 21 EC2-Classic...................................................................................................................... 21 EC2-VPC.......................................................................................................................... 21 E Adding a Rule to Your Security Group ......................................................................................... 22 EC2-Classic...................................................................................................................... 22 EC2-VPC...............................R........................................................................................... 22 Launching an Instance .............................................................................................................. 22 EC2-Classic...................................................................................................................... 22 P EC2-VPC.......................................................................................................................... 23 Connecting to Your Instance...................................................................................................... 23 List of Commands by FunctionE........................................................................................................... 24 Commands (CLI Tools)...................................................................................................................... 30 ec2-accept-vpc-peDering-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 iii The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. Amazon Elastic Compute Cloud CLI Reference Common Options............................................................................................................. 42 Output............................................................................................................................ 44 Examples......................................................................................................................... 44 Related Topics................................................................................................................. 45 ec2-associate-address............................................................................................................... 45 Description...................................................................................................................... 45 Syntax............................................................................................................................. 45 Options........................................................................................................................... 46 Common Options............................................................................................................. 47 Output............................................................................................................................ 49 Examples......................................................................................................................... 49 Related Topics................................................................................................................. 50 ec2-associate-dhcp-options........................................................................................................ 50 Description...................................................................................................................... 50 Syntax............................................................................................................................. 50 Options........................................................................................................................... 51 D Common Options............................................................................................................. 51 Output............................................................................................................................ 53 Examples.........................................................................E................................................ 53 Related Topics................................................................................................................. 53 ec2-associate-route-table.......................................................................................................... 54 T Description...................................................................................................................... 54 Syntax............................................................................................................................. 54 A Options........................................................................................................................... 54 Common Options............................................................................................................. 55 Output...................................................C......................................................................... 56 Examples......................................................................................................................... 57 Related Topics................................................................................................................. 57 E ec2-attach-classic-link-vpc......................................................................................................... 57 Description...................................................................................................................... 57 R Syntax............................................................................................................................. 58 Options........................................................................................................................... 58 Common Options.........P.................................................................................................... 58 Output............................................................................................................................ 60 Example.......................................................................................................................... 60 E Related Topics................................................................................................................. 61 ec2-attach-internet-gateway...................................................................................................... 61 Description.D..................................................................................................................... 61 Syntax............................................................................................................................. 61 Options........................................................................................................................... 62 Common Options............................................................................................................. 62 Output............................................................................................................................ 64 Examples......................................................................................................................... 64 Related Topics................................................................................................................. 64 ec2-attach-network-interface..................................................................................................... 65 Description...................................................................................................................... 65 Syntax............................................................................................................................. 65 Options........................................................................................................................... 65 Common Options............................................................................................................. 66 Output............................................................................................................................ 67 Examples......................................................................................................................... 67 Related Topics................................................................................................................. 68 ec2-attach-volume.................................................................................................................... 68 Description...................................................................................................................... 68 Syntax............................................................................................................................. 69 Options........................................................................................................................... 69 Common Options............................................................................................................. 69 iv The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. Amazon Elastic Compute Cloud CLI Reference Output............................................................................................................................ 71 Examples......................................................................................................................... 71 Related Topics................................................................................................................. 72 ec2-attach-vpn-gateway............................................................................................................ 72 Description...................................................................................................................... 72 Syntax............................................................................................................................. 72 Options........................................................................................................................... 72 Common Options............................................................................................................. 73 Output............................................................................................................................ 75 Examples......................................................................................................................... 75 Related Topics................................................................................................................. 75 ec2-authorize........................................................................................................................... 76 Description...................................................................................................................... 76 Syntax............................................................................................................................. 76 Options........................................................................................................................... 76 Common Options............................................................................................................. 79 D Output............................................................................................................................ 80 Examples......................................................................................................................... 81 Related Topics.................................................................E................................................ 82 ec2-bundle-instance.................................................................................................................. 82 Description...................................................................................................................... 82 T Syntax............................................................................................................................. 83 Options........................................................................................................................... 83 A Common Options............................................................................................................. 86 Output............................................................................................................................ 87 Examples................................................C......................................................................... 88 Related Topics................................................................................................................. 88 ec2-cancel-bundle-task............................................................................................................. 88 E Description...................................................................................................................... 88 Syntax............................................................................................................................. 88 R Options........................................................................................................................... 89 Common Options............................................................................................................. 89 Output........................P.................................................................................................... 91 Examples......................................................................................................................... 91 Related Topics................................................................................................................. 91 E ec2-cancel-conversion-task........................................................................................................ 92 Description...................................................................................................................... 92 Syntax.......D...................................................................................................................... 92 Options........................................................................................................................... 92 Common Options............................................................................................................. 92 Output............................................................................................................................ 94 Examples......................................................................................................................... 94 Related Topics................................................................................................................. 95 ec2-cancel-export-task.............................................................................................................. 95 Description...................................................................................................................... 95 Syntax............................................................................................................................. 95 Options........................................................................................................................... 95 Common Options............................................................................................................. 96 Output............................................................................................................................ 97 Example.......................................................................................................................... 98 Related Topics................................................................................................................. 98 ec2-cancel-reserved-instances-listing .......................................................................................... 98 Description...................................................................................................................... 98 Syntax............................................................................................................................. 99 Options........................................................................................................................... 99 Common Options............................................................................................................. 99 Output.......................................................................................................................... 101 v The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. Amazon Elastic Compute Cloud CLI Reference Examples....................................................................................................................... 101 Related Operations......................................................................................................... 102 ec2-cancel-spot-instance-requests............................................................................................. 102 Description.................................................................................................................... 102 Syntax........................................................................................................................... 102 Options......................................................................................................................... 102 Common Options........................................................................................................... 102 Output.......................................................................................................................... 104 Examples....................................................................................................................... 104 Related Topics................................................................................................................ 105 ec2-confirm-product-instance................................................................................................... 105 Description.................................................................................................................... 105 Syntax........................................................................................................................... 105 Options......................................................................................................................... 105 Common Options........................................................................................................... 106 Output.......................................................................................................................... 107 D Examples....................................................................................................................... 108 Related Topics................................................................................................................ 108 ec2-copy-image........................................................................E.............................................. 109 Description.................................................................................................................... 109 Syntax........................................................................................................................... 109 T Options......................................................................................................................... 109 Common Options........................................................................................................... 110 A Output.......................................................................................................................... 112 Examples....................................................................................................................... 112 Related Topics........................................C........................................................................ 112 ec2-copy-snapshot.................................................................................................................. 113 Description.................................................................................................................... 113 E Syntax........................................................................................................................... 113 Options......................................................................................................................... 113 R Common Options........................................................................................................... 115 Output.......................................................................................................................... 116 Examples.....................P.................................................................................................. 116 Related Topics................................................................................................................ 117 ec2-create-customer-gateway.................................................................................................. 117 E Description.................................................................................................................... 117 Syntax........................................................................................................................... 118 Options.....D.................................................................................................................... 118 Common Options........................................................................................................... 119 Output.......................................................................................................................... 120 Examples....................................................................................................................... 121 Related Topics................................................................................................................ 121 ec2-create-dhcp-options.......................................................................................................... 121 Description.................................................................................................................... 121 Syntax........................................................................................................................... 122 Options......................................................................................................................... 122 Common Options........................................................................................................... 123 Output.......................................................................................................................... 124 Examples....................................................................................................................... 125 Related Topics................................................................................................................ 125 ec2-create-group.................................................................................................................... 125 Description.................................................................................................................... 125 Syntax........................................................................................................................... 126 Options......................................................................................................................... 126 Common Options........................................................................................................... 127 Output.......................................................................................................................... 128 Examples....................................................................................................................... 129 vi The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. Amazon Elastic Compute Cloud CLI Reference Related Topics................................................................................................................ 129 ec2-create-image.................................................................................................................... 130 Description.................................................................................................................... 130 Syntax........................................................................................................................... 130 Options......................................................................................................................... 130 Common Options........................................................................................................... 133 Output.......................................................................................................................... 135 Examples....................................................................................................................... 135 Related Topics................................................................................................................ 135 ec2-create-instance-export-task................................................................................................ 136 Description.................................................................................................................... 136 Syntax........................................................................................................................... 136 Options......................................................................................................................... 136 Common Options........................................................................................................... 137 Output.......................................................................................................................... 139 Examples....................................................................................................................... 139 D Related Topics................................................................................................................ 140 ec2-create-internet-gateway.................................................................................................... 140 Description......................................................................E.............................................. 140 Syntax........................................................................................................................... 140 Options......................................................................................................................... 140 T Common Options........................................................................................................... 141 Output.......................................................................................................................... 142 A Examples....................................................................................................................... 142 Related Topics................................................................................................................ 143 ec2-create-keypair...........................................C....................................................................... 143 Description.................................................................................................................... 143 Syntax........................................................................................................................... 143 E Options......................................................................................................................... 144 Common Options........................................................................................................... 144 R Output.......................................................................................................................... 146 Examples....................................................................................................................... 146 Related Topics.............P................................................................................................... 147 ec2-create-network-acl ............................................................................................................ 147 Description.................................................................................................................... 147 E Syntax........................................................................................................................... 148 Options......................................................................................................................... 148 Common OpDtions........................................................................................................... 148 Output.......................................................................................................................... 150 Examples....................................................................................................................... 150 Related Topics................................................................................................................ 150 ec2-create-network-acl-entry................................................................................................... 151 Description.................................................................................................................... 151 Syntax........................................................................................................................... 151 Options......................................................................................................................... 151 Common Options........................................................................................................... 153 Output.......................................................................................................................... 155 Examples....................................................................................................................... 155 Related Topics................................................................................................................ 155 ec2-create-network-interface................................................................................................... 156 Description.................................................................................................................... 156 Syntax........................................................................................................................... 156 Options......................................................................................................................... 156 Common Options........................................................................................................... 158 Output.......................................................................................................................... 159 Examples....................................................................................................................... 159 Related Topics................................................................................................................ 160 vii The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. Amazon Elastic Compute Cloud CLI Reference ec2-create-placement-group.................................................................................................... 160 Description.................................................................................................................... 160 Syntax........................................................................................................................... 161 Options......................................................................................................................... 161 Common Options........................................................................................................... 161 Output.......................................................................................................................... 163 Examples....................................................................................................................... 163 Related Topics................................................................................................................ 163 ec2-create-reserved-instances-listing ......................................................................................... 164 Description.................................................................................................................... 164 Syntax........................................................................................................................... 164 Options......................................................................................................................... 164 Common Options........................................................................................................... 165 Output.......................................................................................................................... 167 Examples....................................................................................................................... 167 Related Operations......................................................................................................... 168 D ec2-create-route..................................................................................................................... 168 Description.................................................................................................................... 168 Syntax............................................................................E............................................... 168 Options......................................................................................................................... 169 Common Options........................................................................................................... 170 T Output.......................................................................................................................... 172 Examples....................................................................................................................... 172 A Related Topics................................................................................................................ 172 ec2-create-route-table............................................................................................................. 173 Description.............................................C....................................................................... 173 Syntax........................................................................................................................... 173 Options......................................................................................................................... 173 E Common Options........................................................................................................... 174 Output.......................................................................................................................... 175 R Examples....................................................................................................................... 176 Related Topics................................................................................................................ 176 ec2-create-snapshot.............P................................................................................................... 176 Description.................................................................................................................... 176 Syntax........................................................................................................................... 177 E Options......................................................................................................................... 177 Common Options........................................................................................................... 178 Output......D.................................................................................................................... 179 Examples....................................................................................................................... 180 Related Topics................................................................................................................ 180 ec2-create-spot-datafeed-subscription....................................................................................... 180 Description.................................................................................................................... 180 Syntax........................................................................................................................... 181 Options......................................................................................................................... 181 Common Options........................................................................................................... 181 Output.......................................................................................................................... 183 Examples....................................................................................................................... 183 Related Topics................................................................................................................ 183 ec2-create-subnet................................................................................................................... 184 Description.................................................................................................................... 184 Syntax........................................................................................................................... 184 Options......................................................................................................................... 184 Common Options........................................................................................................... 185 Output.......................................................................................................................... 187 Examples....................................................................................................................... 187 Related Topics................................................................................................................ 187 ec2-create-tags...................................................................................................................... 188 viii The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. Amazon Elastic Compute Cloud CLI Reference Description.................................................................................................................... 188 Syntax........................................................................................................................... 188 Options......................................................................................................................... 188 Common Options........................................................................................................... 189 Output.......................................................................................................................... 190 Examples....................................................................................................................... 191 Related Topics................................................................................................................ 191 ec2-create-volume.................................................................................................................. 191 Description.................................................................................................................... 191 Syntax........................................................................................................................... 192 Options......................................................................................................................... 192 Common Options........................................................................................................... 194 Output.......................................................................................................................... 196 Examples....................................................................................................................... 196 Related Topics................................................................................................................ 197 ec2-create-vpc........................................................................................................................ 197 D Description.................................................................................................................... 197 Syntax........................................................................................................................... 198 Options...........................................................................E.............................................. 198 Common Options........................................................................................................... 198 Output.......................................................................................................................... 200 T Examples....................................................................................................................... 200 Related Topics................................................................................................................ 201 A ec2-create-vpc-endpoint.......................................................................................................... 201 Description.................................................................................................................... 201 Syntax...................................................C........................................................................ 201 Options......................................................................................................................... 202 Common Options........................................................................................................... 202 E Output.......................................................................................................................... 204 Examples....................................................................................................................... 205 R Related Topics................................................................................................................ 205 ec2-create-vpc-peering-connection........................................................................................... 205 Description..................P.................................................................................................. 205 Syntax........................................................................................................................... 206 Options......................................................................................................................... 206 E Common Options........................................................................................................... 206 Output.......................................................................................................................... 208 Examples...D.................................................................................................................... 209 Related Topics................................................................................................................ 209 ec2-create-vpn-connection....................................................................................................... 210 Description.................................................................................................................... 210 Syntax........................................................................................................................... 210 Options......................................................................................................................... 210 Common Options........................................................................................................... 212 Output.......................................................................................................................... 213 Examples....................................................................................................................... 214 Related Topics................................................................................................................ 214 ec2-create-vpn-connection-route.............................................................................................. 214 Description.................................................................................................................... 214 Syntax........................................................................................................................... 215 Options......................................................................................................................... 215 Common Options........................................................................................................... 215 Output.......................................................................................................................... 217 Examples....................................................................................................................... 217 Related Topics................................................................................................................ 217 ec2-create-vpn-gateway.......................................................................................................... 218 Description.................................................................................................................... 218 ix The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html. Amazon Elastic Compute Cloud CLI Reference Syntax........................................................................................................................... 218 Options......................................................................................................................... 218 Common Options........................................................................................................... 218 Output.......................................................................................................................... 220 Examples....................................................................................................................... 220 Related Topics................................................................................................................ 220 ec2-delete-customer-gateway.................................................................................................. 221 Description.................................................................................................................... 221 Syntax........................................................................................................................... 221 Options......................................................................................................................... 221 Common Options........................................................................................................... 222 Output.......................................................................................................................... 223 Examples....................................................................................................................... 223 Related Topics................................................................................................................ 224 ec2-delete-dhcp-options.......................................................................................................... 224 Description.................................................................................................................... 224 D Syntax........................................................................................................................... 224 Options......................................................................................................................... 224 Common Options.............................................................E.............................................. 225 Output.......................................................................................................................... 226 Examples....................................................................................................................... 227 T Related Topics................................................................................................................ 227 ec2-delete-disk-image............................................................................................................. 227 A Description.................................................................................................................... 227 Syntax........................................................................................................................... 227 Options..................................................C....................................................................... 228 Common Options........................................................................................................... 229 Output.......................................................................................................................... 231 E Examples....................................................................................................................... 231 Related Topics................................................................................................................ 231 R ec2-delete-group.................................................................................................................... 231 Description.................................................................................................................... 231 Syntax........................P................................................................................................... 231 Options......................................................................................................................... 232 Common Options........................................................................................................... 232 E Output.......................................................................................................................... 234 Examples....................................................................................................................... 234 Related TopiDcs................................................................................................................ 234 ec2-delete-internet-gateway.................................................................................................... 235 Description.................................................................................................................... 235 Syntax........................................................................................................................... 235 Options......................................................................................................................... 235 Common Options........................................................................................................... 235 Output.......................................................................................................................... 237 Examples....................................................................................................................... 237 Related Topics................................................................................................................ 238 ec2-delete-keypair.................................................................................................................. 238 Description.................................................................................................................... 238 Syntax........................................................................................................................... 238 Options......................................................................................................................... 238 Common Options........................................................................................................... 239 Output.......................................................................................................................... 240 Examples....................................................................................................................... 240 Related Topics................................................................................................................ 241 ec2-delete-network-acl ............................................................................................................ 241 Description.................................................................................................................... 241 Syntax........................................................................................................................... 241 x The Amazon EC2 CLI has been deprecated and replaced with the AWS Command Line Interface (CLI). See the AWS Command Line Interface User Guide at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html.

Description:
Task 1: Download the Command Line Interface Tools (CLI Tools) .. 11 Task 2: Set the JAVA_HOME Environment
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.