Type: | Package |
Title: | Managing Profiles on Amazon Web Service |
Version: | 0.1.0 |
Maintainer: | Samuel Macedo <samuelmacedo@recife.ifpe.edu.br> |
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. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | stringr, tibble, utils, withr |
RoxygenNote: | 6.1.1 |
Suggests: | testthat |
NeedsCompilation: | no |
Packaged: | 2019-01-02 20:07:06 UTC; dmmad |
Author: | Samuel Macedo [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2019-01-04 10:50:06 UTC |
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
|
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)