Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

read_credentials

Use Credentials from .aws/credentials File


Description

Use a profile from a .aws/credentials file

Usage

read_credentials(
  file = Sys.getenv("AWS_SHARED_CREDENTIALS_FILE", default_credentials_file())
)

use_credentials(
  profile = Sys.getenv("AWS_PROFILE", "default"),
  file = Sys.getenv("AWS_SHARED_CREDENTIALS_FILE", default_credentials_file())
)

default_credentials_file()

Arguments

file

A character string containing a path to a .aws/credentials file. By default, the standard/centralized file given by AWS_SHARED_CREDENTIALS_FILE is used, otherwise an assumed default location is assumed. For use_credentials, this can also be an object of class “aws_credentials” (as returned by use_credentials).

profile

A character string specifying which profile to use from the file. By default, the “default” profile is used.

Details

read_credentials reads and parses a .aws/credentials file into an object of class “aws_credentials”.

use_credentials uses credentials from a profile stored in a credentials file to set the environment variables used by this package. It is called by default during package load if the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables are not set.

Author(s)

Thomas J. Leeper <thosjleeper@gmail.com>

References

See Also

Examples

## Not run: 
# read and parse a credentials file
read_credentials()

# set environment variables from a profile
use_credentials()

## End(Not run)

aws.signature

Amazon Web Services Request Signatures

v0.6.0
GPL (>= 2)
Authors
Thomas J. Leeper [aut] (<https://orcid.org/0000-0003-4097-6326>), Jonathan Stott [cre, aut], Mike Kaminsky [ctb]
Initial release
2020-06-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.