AWS SDK for Ruby Developer Guide - Amazon Web awsdocs.s3. the Revision History for the SDK for Ruby...

Click here to load reader

  • date post

    10-Jun-2018
  • Category

    Documents

  • view

    216
  • download

    0

Embed Size (px)

Transcript of AWS SDK for Ruby Developer Guide - Amazon Web awsdocs.s3. the Revision History for the SDK for Ruby...

  • AWS SDK for RubyDeveloper Guide

    Version v1.0.0

  • AWS SDK for Ruby: Developer GuideCopyright 2014 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

    The following are trademarks of Amazon Web Services, Inc.: Amazon, Amazon Web Services Design, AWS, Amazon CloudFront,Cloudfront, CloudTrail, Amazon DevPay, DynamoDB, ElastiCache, Amazon EC2, Amazon Elastic Compute Cloud, Amazon Glacier,Kinesis, Kindle, Kindle Fire, AWS Marketplace Design, Mechanical Turk, Amazon Redshift, Amazon Route 53, Amazon S3, AmazonVPC. In addition, Amazon.com graphics, logos, page headers, button icons, scripts, and service names are trademarks, or trade dressof Amazon in the U.S. and/or other countries. Amazon's trademarks and trade dress may not be used in connection with any productor service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparagesor discredits Amazon.

    All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connectedto, or sponsored by Amazon.

    AWS SDK for Ruby Developer Guide

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

    What's in this Guide? ............................................................................................................. 1Viewing the Revision History for the SDK for Ruby ...................................................................... 2About Amazon Web Services .................................................................................................. 2

    Getting Started ............................................................................................................................. 3Get an AWS Account and Your AWS Credentials ......................................................................... 3Installing the SDK for Ruby ..................................................................................................... 4Setting up AWS Credentials .................................................................................................... 4Specifying Credentials ............................................................................................................ 5

    Using Default Credentials ............................................................................................... 6Specifying a Credentials Provider ..................................................................................... 6Explicitly Specifying Credentials ....................................................................................... 7

    Where to Go from Here .......................................................................................................... 8Using AWS Services ...................................................................................................................... 9

    Using IAM Roles for EC2 Instances .......................................................................................... 9Using IAM Roles for EC2 Instances to Manage Your Credentials .......................................... 10Walkthrough: Using IAM Roles to Retrieve an Amazon S3 Object from an EC2 Instance .......... 10

    Start an Amazon EC2 Instance .............................................................................................. 16Create an Amazon EC2 Client ....................................................................................... 16Create a Security Group ............................................................................................... 17Authorize Security Group Ingress ................................................................................... 17Create a Key Pair ........................................................................................................ 18Run an Amazon EC2 Instance ....................................................................................... 18Connect to Your Amazon EC2 Instance ............................................................................ 19Related Resources ...................................................................................................... 19

    Additional Resources ................................................................................................................... 20Home Page for AWS SDK for Ruby ......................................................................................... 20SDK Reference Documentation .............................................................................................. 20AWS Forums ...................................................................................................................... 20AWS SDK for Ruby Samples ................................................................................................. 20

    Installing the samples ................................................................................................... 21Set your AWS Credentials ............................................................................................. 22Run the Samples ......................................................................................................... 22

    Document History ........................................................................................................................ 25

    Version v1.0.0iii

    AWS SDK for Ruby Developer Guide

  • What is the AWS SDK for Ruby?

    The AWS SDK for Ruby provides a Ruby API for AWS infrastructure services. Using the SDK, you canbuild applications on top of Amazon Simple Storage Service (Amazon S3), Amazon Elastic ComputeCloud (Amazon EC2), Amazon SimpleDB, and more.

    New AWS services are occasionally added to the AWS SDK for Ruby. For a complete list of the servicesthat are supported by the SDK for Ruby, see Supported Services on the AWS SDK for Ruby home page.

    Topics

    What's in this Guide? (p. 1)

    Viewing the Revision History for the SDK for Ruby (p. 2)

    About Amazon Web Services (p. 2)

    What's in this Guide?This is the AWS SDK for Ruby Developer Guide, which aims to provide you with information about howto install, set up, and use the SDK for Ruby to program applications in Ruby that can make full use of theservices offered by Amazon Web Services.

    Here is a guide to the contents:

    Getting Started (p. 3)If you are just starting out with the SDK for Ruby, you should first read through the Getting Star-ted (p. 3) section. It will guide you through downloading and installing the AWS SDK for Ruby, andhow to set up your development environment.

    Using AWS Services (p. 9)This chapter provides specific guidance about using the SDK for Ruby with various AWS services.

    Additional Resources (p. 20)This chapter provides information about additional resources that you can use to learn about theSDK for Ruby.

    Document History (p. 25)This chapter provides details about major changes to the documentation. New sections and topicsas well as significantly revised topics are listed here.

    Version v1.0.01

    AWS SDK for Ruby Developer GuideWhat's in this Guide?

    https://aws.amazon.com/sdkforruby/#Supported_Services

  • Viewing the Revision History for the SDK forRuby

    The AWS SDK for Ruby is regularly updated to support new services and new service features. To seewhat changed with a given release, you can check the release notes history.

    Each release of the AWS SDK for Ruby is also published to GitHub. The comments in the commit historyprovide information about what changed in each commit.To view the comments associated with a commit,click the plus sign next to that commit.

    About Amazon Web ServicesAmazon Web Services (AWS) is a collection of digital infrastructure services that developers can leveragewhen developing their applications. The services include computing, storage, database, and applicationsynchronization (messaging and queuing). AWS uses a pay-as-you-go service model.You are chargedonly for the services that youor your applicationsuse. Also, to make AWS more approachable as aplatform for prototyping and experimentation, AWS offers a free usage tier. On this tier, services are freebelow a certain level of usage. For more information about AWS costs and the Free Tier, see Test-DrivingAWS in the Free Usage Tier. To obtain an AWS account, open the AWS home page and then click SignUp.

    Version v1.0.02

    AWS SDK for Ruby Developer GuideViewing the Revision History for the SDK for Ruby

    http://aws.amazon.com/releasenotes/Ruby?browse=1https://github.com/amazonwebservices/aws-sdk-for-ruby/commits/masterhttp://docs.aws.amazon.com/FeaturedArticles/latest/TestDriveFreeTier.htmlhttp://docs.aws.amazon.com/FeaturedArticles/latest/TestDriveFreeTier.htmlhttps://portal.aws.amazon.com/gp/aws/developer/registration/index.html

  • Getting Started with the AWS SDKfor Ruby

    This section provides information about how to install, set up, and use the AWS SDK for Ruby. If youhave never used the SDK for Ruby before, you should start here.

    Topics

    Get an AWS Account and Your AWS Credentials (p. 3)

    Installing the SDK for Ruby (p. 4)

    Setting up AWS Credentials for Use with the SDK for Ruby (p. 4)

    Specifying AWS Credentials for SDK for Ruby Applications (p. 5)

    Where to Go from Here (p. 8)

    Get an AWS Account and Your AWS CredentialsTo access AWS, you will need to sign up for an AWS account.

    To sign up for an AWS account

    1. Open http://aws.amazon.com, and then click Sign Up.

    2. Follow the on-screen instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a PIN using the phonekeypad.

    AWS sends you a confirmati