Elastic Compute Cloud¶
EC2 is the main workhorse of an AWS solution. It allows you to (manually or automatically) start virtual machines to run your application code.
We recommend that your EC2 machines are stateless.
You can create EBS volumes to attach to your EC2 instance.
In order to securely use SSH with an EC2 instance (whether created directly or via a AutoScalingGroup) you must first upload the key to the EC2 key pairs database. The KeyPair resource imports and keeps up to date an ssh public key.
It can be used with any AWS account resource:
aws.add_keypair( name="my-keypair", public_key=open(os.expanduser('~/.ssh/id_rsa.pub')), )
The name of the key. This field is required.
The public key material, in PEM form. Must be supplied in order to upload a key pair.