credentials: Set or get AWS credentials

Description Usage Arguments Details Value Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

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

1
2
3
4
5
## Get your credentials from the environment variables or AWS cli
aws_set_credentials()

## show your current credentials
aws_get_credentials()

aws.ecx documentation built on Jan. 27, 2022, 1:10 a.m.