Generating Key Pair Aws Iam
[ aws . ec2 ]
Description¶
Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#1 private key. If a key with the specified name already exists, Amazon EC2 returns an error.
- The key must match a key pair name loaded up into the remote. By default, this is blank, and Packer will generate a temporary keypair unless sshpassword is used. Sshprivatekeyfile or sshagentauth must be specified when sshkeypairname is utilized. Temporarykeypairname (string) - The name of.
- Create AWS Key Pair. The easiest way to get started with AWS is to create a 'root' key pair. Go to the AWS Console and log in. Click on your name at the top right and click 'My Security Credentials' in the drop-down menu. Click the triangle next to 'Access Keys' to expand it. Click 'Create New Access Key'.
Provides an EC2 key pair resource. A key pair is used to control login access to EC2 instances. Currently this resource requires an existing user-supplied key pair. This key pair's public key will be registered with AWS to allow logging-in to EC2 instances. When importing an existing key pair the public key material may be in any format supported by AWS.
You can have up to five thousand key pairs per Region.
The key pair returned to you is available only in the Region in which you create it. If you prefer, you can create your own key pair using a third-party tool and upload it to any Region using ImportKeyPair .
For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
See 'aws help' for descriptions of global parameters.
Synopsis¶
Options¶
--key-name (string)
A unique name for the key pair.
Constraints: Up to 255 ASCII characters
--dry-run--no-dry-run (boolean)
--cli-input-json (string)Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.
--generate-cli-skeleton (string)Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.
See 'aws help' for descriptions of global parameters.
Examples¶
To create a key pair
This example creates a key pair named MyKeyPair.
Command:
The output is an ASCII version of the private key and key fingerprint. You need to save the key to a file.
For more information, see Using Key Pairs in the AWS Command Line Interface User Guide.
Output¶
KeyFingerprint -> (string)
KeyMaterial -> (string)
KeyName -> (string)
Generating Key Pair Aws Iam Number
KeyPairId -> (string)