Amazon AWS SDK Uživatelský manuál Strana 20

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 26
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 19
Start an Amazon EC2 Instance
This section demonstrates how to use the AWS SDK for Ruby to start an Amazon Elastic Compute Cloud
(Amazon EC2) instance.
Topics
Create an Amazon EC2 Client (p. 17)
Create a Security Group (p.18)
Authorize Security Group Ingress (p.19)
Create a Key Pair (p.19)
Run an Amazon EC2 Instance (p. 20)
Connect to Your Amazon EC2 Instance (p. 20)
Related Resources (p. 21)
Create an Amazon EC2 Client
You will need an Amazon EC2 client in order to create security groups and key pairs, and run Amazon
EC2 instances. Before configuring your client, you must create a YAML file to store your AWS Access
Key and your Secret Key.This YAML file must be placed in the same directory as your Ruby program.
The file looks like this:
access_key_id: YOUR_ACCESS_KEY
secret_access_key: YOUR_SECRET_KEY
Specify your AWS credentials as values for the access_key_id and secret_access_key entries.To
learn more about your AWS credentials, including where to find them, go to About AWS Security
Credentials.
After you create this file, you are ready to create and initialize your Amazon EC2 client.
To create and initialize an Amazon EC2 client
1. Pass your configuration file into the AWS.config method, as follows:
Version v1.0.0
17
AWS SDK for Ruby Developer Guide
Create an Amazon EC2 Client
Zobrazit stránku 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 26

Komentáře k této Příručce

Žádné komentáře