Amazon AWS SDK Manuel d'utilisateur

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Logiciel Amazon AWS SDK. AWS SDK for Ruby Developer Guide Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer

Résumé du contenu

Page 1 - AWS SDK for Ruby

AWS SDK for RubyDeveloper GuideVersion v1.0.0

Page 2

NoteYou must have specified default credentials in at least one of these ways, or the attempt will fail.For more information, see Setting up AWS Crede

Page 3 - Table of Contents

s3 = AWS::S3.new( :access_key_id => 'AKIAIOSFODNN7EXAMPLE', :secret_access_key => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&apo

Page 4 - What's in this Guide?

Using Amazon Web Services withthe AWS SDK for RubyNoteThis documentation is for the AWS SDK for Ruby version 1, which is a legacy version. For themost

Page 5 - About Amazon Web Services

• Walkthrough: Using IAM Roles to Retrieve an Amazon S3 Object from an EC2 Instance (p. 10)Using IAM Roles for EC2 Instances to Manage YourCredentials

Page 6 - To sign up for an AWS account

bucket_name = 'text-content'obj_name = 'text-object.txt'document = s3.buckets[bucket_name].objects[obj_name]File.open(obj_name, &q

Page 7 - Installing the SDK for Ruby

We'll now examine each of these steps in detail.Create an IAM role using the AWS Management ConsoleThe first step is to create an IAM role that h

Page 8 - SDK for Ruby

Be sure to download the .pem file for the keypair you created:When you are finished, click Launch Instance to launch your EC2 instance.Go to the EC2 I

Page 9 - Applications

Transfer the source to your EC2 instanceTransfer the modified source file to your EC2 instance using scp. Be sure to specify the .pem file youcreated

Page 10

ruby get_object.rbIf everything is set up correctly, the file should be copied to your EC2 instance just as it was to your localmachine when you were

Page 11 - Where to Go from Here

config_file = File.join(File.dirname(__FILE__), "config.yml")AWS.config(YAML.load(File.read(config_file)))2. Create a new EC2 instance, sp

Page 12 - Version v1.0.0

AWS SDK for Ruby: Developer GuideCopyright © 2015 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.The following are trademarks of

Page 13 - Credentials

For information about creating a key pair, see Create a Key Pair (p. 17).For information about running your Amazon EC2 instance, see Run an Amazon EC2

Page 14 - To test the program locally

Calling create is the only way to obtain the private key programmatically.You can always accessyour private key through the AWS Management Console.Be

Page 15

Before connecting to your Amazon EC2 instance, you must ensure that the instance’s SSH/RDP port isopen to traffic.You must also install an SSH/RDP cli

Page 16

Additional ResourcesNoteThis documentation is for the AWS SDK for Ruby version 1, which is a legacy version. For themost recent version of the SDK for

Page 17 - To run the program

AWS SDK for Ruby SamplesNoteThe samples described in this topic are included with the SDK for Ruby version 1, which is alegacy version. For the most r

Page 18 - Start an Amazon EC2 Instance

• https://github.com/aws/aws-sdk-ruby/archive/master.zip2. Unzip it into a local directory.3. Open a terminal window and change to the directory where

Page 19 - Create a Security Group

If successful, the sample will output the S3 URL of the file that you just uploaded, with an option to deleteit:Uploaded test.png to:https://s3.amazon

Page 20 - Create a Key Pair

secret_access_key: REPLACE_WITH_SECRET_ACCESS_KEYtest: <<: *development production: <<: *development 6. Create app/models/my_record.

Page 21 - Run an Amazon EC2 Instance

Myapp::Application.routes.draw do # add this line: resources :my_recordsendNow, you can create records in the browser at localhost:3000/my_records.

Page 22 - Related Resources

Document HistoryNoteThis documentation is for the AWS SDK for Ruby version 1, which is a legacy version. For themost recent version of the SDK for Rub

Page 23 - Additional Resources

Table of ContentsWhat is the AWS SDK for Ruby v1? ... 1

Page 24 - AWS SDK for Ruby Samples

What is the AWS SDK for Ruby v1?ImportantThis documentation is for the SDK for Ruby version 1, which is a legacy version. For the mostrecent version o

Page 25 - Run the Samples

Viewing the Revision History for the SDK forRubyThe AWS SDK for Ruby is regularly updated to support new services and new service features. To seewhat

Page 26

Getting Started with the AWS SDKfor RubyNoteThis documentation is for the AWS SDK for Ruby version 1, which is a legacy version. For themost recent ve

Page 27

To get your access key ID and secret access keyAccess keys consist of an access key ID and secret access key, which are used to sign programmaticreque

Page 28

Setting up AWS Credentials for Use with theSDK for RubyNoteThis documentation is for the AWS SDK for Ruby version 1, which is a legacy version. For th

Page 29 - Document History

permissions, as shown in Using IAM Roles for Amazon EC2 Instances with the AWS SDK forRuby (p. 9).The AWS SDKs and CLIs use a provider chain to look f

Commentaires sur ces manuels

Pas de commentaire