Amazon AWS SDK Manuel d'utilisateur Page 11

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 29
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 10
s3 = AWS::S3.new(
:access_key_id => 'AKIAIOSFODNN7EXAMPLE',
:secret_access_key => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY')
Specify credentials for every service by using the AWS.config method's :access_key_id and
:secret_access_key options.
The following example specifies an explicit set of credentials for every service, so you can use the
default constructor to create the Amazon S3 client object. It will automatically use the credentials that
you passed to AWS.config.
AWS.config(
:access_key_id => 'AKIAIOSFODNN7EXAMPLE',
:secret_access_key => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY')
# S3.new will now use the credentials specified in AWS.config
s3 = AWS::S3.new
Warning
If you explicitly specify credentials, make sure that you do not accidentally expose your code on
a publicly accessible site, such as a public GitHub repository. Doing so could compromise your
account's integrity.
Where to Go from Here
Note
This documentation is for the AWS SDK for Ruby version 1, which is a legacy version. For the
most recent version of the SDK for Ruby, see AWS SDK for Ruby - Version 2.
The SDK reference documentation provides information about both the AWS Ruby gem and AWS Rails
integration gem.
The Additional Resources section has pointers to other resources to assist you in programming AWS.
The SDK for Ruby is packaged with a number of code samples, which you can browse on your machine
or view on GitHub. For more information about the samples that are provided, see AWS SDK for Ruby
Samples (p. 21).
Version v1.0.0
8
AWS SDK for Ruby Developer Guide
Where to Go from Here
Vue de la page 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 28 29

Commentaires sur ces manuels

Pas de commentaire