GithubHelp home page GithubHelp logo

aws-s3-writer's Introduction

AWS S3 Writer

Upload all files in /data/in/files to the specified bucket and prefix. Existing files are overwritten.

Usage

Configuration options

  • loginType (required, default credentials) -- Login type (credentials/role)
  • accessKeyId (required if your choose loginType credentials) -- AWS Access Key ID
  • #secretAccessKey (required if your choose loginType credentials) -- AWS Secret Access Key
  • accountId (required if your choose loginType role) - AWS Account Id
  • bucket (required) -- AWS S3 bucket name, it's region will be autodetected
  • prefix (optional) -- Path prefix

Sample configurations

Upload to bucket root

Using credentials

{
    "parameters": {
        "accessKeyId": "AKIA****",
        "#secretAccessKey": "****",
        "bucket": "myBucket"
    }
}

Using role

{
    "parameters": {
        "loginType": "role",
        "accountId": "123456789",
        "bucket": "myBucket"
    }
}

Upload with prefix bucket root

{
    "parameters": {
        "accessKeyId": "AKIA****",
        "#secretAccessKey": "****",
        "bucket": "myBucket",
        "prefix": "myPath/"
    }
}

Development

Preparation

  • Create AWS S3 bucket and IAM user using aws-services.json CloudFormation template.
  • Create .env file. Use output of aws-services CloudFront stack to fill the variables and your S3 credentials.
AWS_S3_BUCKET=
AWS_REGION=
WRITER_AWS_ACCESS_KEY_ID=
WRITER_AWS_SECRET_ACCESS_KEY=
FIXTURES_AWS_ACCESS_KEY_ID=
FIXTURES_AWS_SECRET_ACCESS_KEY=
KEBOOLA_USER_AWS_ACCESS_KEY=
KEBOOLA_USER_AWS_SECRET_KEY=
ACCOUNT_ID=
ROLE_NAME=
KBC_PROJECTID=
KBC_STACKID=

Clone this repository and init the workspace with following command:

git clone https://github.com/keboola/aws-s3-writer
cd aws-s3-writer
docker-compose build
docker-compose run --rm dev composer install --no-scripts

Run the test suite using this command:

docker-compose run --rm dev composer tests

Integration

For information about deployment and integration with KBC, please refer to the deployment section of developers documentation

License

MIT licensed, see LICENSE file.

aws-s3-writer's People

Contributors

ondrejhlavacek avatar ondrajodas avatar adamvyborny avatar eddycek avatar kebooladockerhubprivatetest avatar tomasfejfar avatar ujovlado avatar

Watchers

Štěpán Vraný avatar Martin Zajíc avatar Roman Pištěk avatar  avatar  avatar Vojtěch Biberle avatar James Cloos avatar Martin Halamíček avatar Miroslav Čillík avatar Erik Zigo avatar Pavel Šuraba avatar Roman Braciník avatar Jakub Kotek avatar Jiří Semmler avatar Martin Vaško avatar Martin Jandl avatar  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.