GithubHelp home page GithubHelp logo

isabella232 / aws.kms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudyr/aws.kms

0.0 0.0 0.0 35 KB

Amazon Web Services Key Management Service Client

Makefile 2.07% R 95.62% Shell 2.31%

aws.kms's Introduction

AWS KMS Client Package.

aws.kms is a package for the AWS KMS Service.

To use the package, you will need an AWS account and to enter your credentials into R. Your keypair can be generated on the IAM Management Console under the heading Access Keys. Note that you only have access to your secret key once. After it is generated, you need to save it in a secure location. New keypairs can be generated at any time if yours has been lost, stolen, or forgotten. The aws.iam package profiles tools for working with IAM, including creating roles, users, groups, and credentials programmatically; it is not needed to use IAM credentials.

To use the package, you will need an AWS account and to enter your credentials into R. Your keypair can be generated on the IAM Management Console under the heading Access Keys. Note that you only have access to your secret key once. After it is generated, you need to save it in a secure location. New keypairs can be generated at any time if yours has been lost, stolen, or forgotten. The aws.iam package profiles tools for working with IAM, including creating roles, users, groups, and credentials programmatically; it is not needed to use IAM credentials.

A detailed description of how credentials can be specified is provided at: https://github.com/cloudyr/aws.signature/. The easiest way is to simply set environment variables on the command line prior to starting R or via an Renviron.site or .Renviron file, which are used to set environment variables in R during startup (see ? Startup). They can be also set within R:

Sys.setenv("AWS_ACCESS_KEY_ID" = "mykey",
           "AWS_SECRET_ACCESS_KEY" = "mysecretkey",
           "AWS_DEFAULT_REGION" = "us-east-1",
           "AWS_SESSION_TOKEN" = "mytoken")

Code Examples

The core function in aws.kms is create_kms_key() which generates a KMS encryption key.

library("aws.kms")

# create key
k <- create_kms_key(description = "example")
# get key
get_kms_key(k)

With a key, it is possible to do arbitrary encryption:

# encrypt
tmp <- tempfile()
cat("example test", file = tmp)
(etext <- encrypt(tmp, k))

# decrypt
(dtext <- decrypt(etext, k, encode = FALSE))
if (require("base64enc")) {
    rawToChar(base64enc::base64decode(dtext))
}

Installation

CRAN Downloads RForge Travis Build Status codecov.io

Latest stable release from CRAN:

install.packages("aws.kms", repos = "https://cloud.R-project.org")

Lastest development version from RForge.net:

install.packages("aws.kms", repos = c("https://RForge.net", "https://cloud.R-project.org"))

On Windows you may need to add INSTALL_opts = "--no-multiarch"


cloudyr project logo

aws.kms's People

Contributors

leeper avatar s-u avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.