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

credentials

Set or get AWS credentials


Description

Set or get AWS credentials. This function will be called by the package when loaded.

Usage

aws_set_credentials(
  key_file = NULL,
  access_key_id = NULL,
  secret_access_key = NULL,
  region = NULL,
  profile = NULL
)

aws_get_credentials()

aws_get_access_key_id()

aws_get_secret_access_key()

aws_get_region()

aws_set_access_key_id(access_key_id)

aws_set_secret_access_key(secret_access_key)

aws_set_region(region)

aws_list_regions()

Arguments

key_file

The csv credential file that is downloaded from AWS

access_key_id

An AWS Access Key ID

secret_access_key

An AWS Secret Access Key

region

A character string containing the AWS region for the request. If missing, "us-east-1" is assumed.

profile

A character string specifying which profile to use from the file. By default, the profile named in AWS_PROFILE is used, otherwise the "default" profile is used.

Details

The function aws_set_credentials uses aws.signature::locate_credentials internally to determine your credentials. There are a variety of ways to find the credentials, the most common methods are(sorted by the search order)

  1. user-supplied values passed to the function

  2. environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, and AWS_SESSION_TOKEN)

  3. a profile in a local credentials dot file in the current working directory, using the profile specified by AWS_PROFILE

  4. a profile in a global credentials dot file in a location set by AWS_SHARED_CREDENTIALS_FILE or defaulting typically to "~/.aws/credentials" (or another OS-specific location), using the profile specified by AWS_PROFILE

Value

aws_set_credentials : A list containing credentials(with asterisk) and region.

aws_get_credentials : A list containing credentials(with asterisk) and region.

aws_get_access_key_id : The access key id

aws_get_secret_access_key : The secret access key

aws_get_region : The region

aws_set_access_key_id : NULL

aws_set_secret_access_key : NULL

aws_set_region : The old region

aws_list_regions: A vector of available regions

Examples

## Get your credentials from the environment variables or AWS cli
aws_set_credentials()

## show your current credentials
aws_get_credentials()

aws.ecx

Communicating with AWS EC2 and ECS using AWS REST APIs

v1.0.4
GPL-3
Authors
Jiefei Wang [aut, cre]
Initial release

We don't support your browser anymore

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