Package 'raws.profile'

Title: Managing Profiles on Amazon Web Service
Description: This is an R wrapper from the AWS Command Line Interface that provides methods to manage the user configuration on Amazon Web Service. You can create as many profiles as you want, manage them, and delete them. The profiles created with this tool work with all AWS products such as S3, Glacier, and EC2. It also provides a function to automatically install AWS CLI, but you can download it and install it manually if you prefer.
Authors: Samuel Macedo [aut, cre]
Maintainer: Samuel Macedo <[email protected]>
License: GPL (>= 2)
Version: 0.1.0
Built: 2024-12-09 06:36:13 UTC
Source: CRAN

Help Index


Install AWS CLI

Description

This function download and install the AWS CLI for windows, linux or mac. For Linux and Mac is necessary Python 2.6.5 or greater. You can also install the CLI manually, see https://aws.amazon.com/cli/

Usage

aws_cli_install()

User profile configuration

Description

Functions to configure and visualize the user credentials. You can see a profile settings using profile_settings() and vizualise all profiles created using list_profiles(). The AWS CLI saves your credentials in ~/.aws folder, so, for security reasons, delete your credentials when you finish your work using delete_all_profiles().

Usage

create_profile(profile = "default", access_key = NULL,
  secret_key = NULL, region = NULL)

profile_settings(profile = "default")

Arguments

profile

The profile-name. If profile was not supplied create_profile() will create a default profile.

access_key

The access key create by AWS.

secret_key

The secret key create by AWS.

region

The default region

Examples

## Not run: 
# To run these examples you need the AWS CLI, use
# aws_cli_install() if it is not installed.

# create a default user
create_profile(access_key = "my_access_key_1",
               secret_key = "123456789",
               region = "us-east-1" )

# verify if the user was created
profile_settings()

# you can also create a user with a profile name
create_profile(profile = "profile_name",
               access_key = "my_access_key_2",
               secret_key = "987654321",
               region = "us-west-1")

# verify if the user was created
profile_settings(profile = "profile_name")

# remove your credentials from this computer
delete_all_profiles()

## End(Not run)

AWS CLI version

Description

This function provides the version of AWS CLI installed. A message to use aws_cli_install() will be exhibit if the AWS CLI was not found.

Usage

aws_version()

Delete profiles

Description

These functions delete the profiles created. Use delete_profile() to delete one or more profiles and use delete_all_profiles() if you want ot delete all of them.

Usage

delete_profile(profile = "default")

delete_all_profiles()

Arguments

profile

A string or a vector of strings with the profiles to delete.

Examples

## Not run: 
# To run these examples you need the AWS CLI, use
# aws_cli_install() if it is not installed.

# default user
create_profile(access_key = "my_access_key_1",
               secret_key = "123456789",
               region = "us-east-1")

# profile_name1
create_profile(profile = "profile_name1",
               access_key = "my_access_key_2",
               secret_key = "987654321",
               region = "us-west-1")

# profile_name2
create_profile(profile = "profile_name2",
               access_key = "my_access_key_3",
               secret_key = "12344321",
               region = "us-west-1")

# profile_name3
create_profile(profile = "profile_name3",
               access_key = "my_access_key_3",
               secret_key = "98766789",
               region = "us-east-1")

# profile_name4
create_profile(profile = "profile_name4",
               access_key = "my_access_key_4",
               secret_key = "192837465",
               region = "us-west-1")

# profile_name5
create_profile(profile = "profile_name5",
               access_key = "my_access_key_5",
               secret_key = "546372819",
               region = "us-east-1")

# delete default profile
delete_profile()

# delete one profile
delete_profile("profile_name1")

# delete two profiles
delete_profile(c("profile_name2", "profile_name3"))

# remove your credentials from this computer
delete_all_profiles()

## End(Not run)

The profile names saved

Description

The AWs CLI creates two profile files: credentials and config. This function return the profiles availables in both files.

Usage

list_profiles()

Value

A tibble with the profile names available.

Examples

## Not run: 
 # use this for profile names available
 list_profiles()
 
## End(Not run)