Code Monkey home page Code Monkey logo

cryptolambda's Introduction

Twitter Follow

CryptoLambda

This is a Serverless app (for AWS Lambda) that runs periodically every day and buys ETH and BTC from bitstamp. The credentials are encrypted using AWS Key Management Service (KMS).

Credentials encryption

We will use the encryption/decryption API of AWS KMS to generate a file containing the encrypted version of our Bitstamp credentials.

After you installed Serverless framework, and cloned the project, proceed with the following steps.

  1. You need to create a KMS key in AWS console (look under IAM)
  2. Copy the KMS key ARN identifier (something like: arn:aws:kms:eu-west-1:123456789012:key/xxxxxxxxxxx-xxxx-xxxxxxxxxxxx)
  3. Copy the ARN in serverless.yml
  4. Create a string with your Bitstamp API credentials, in this form: client_id,key,secret
  5. Encrypt the string using aws command line, or this simple npm based tool called kms-cli
  6. Dump the encrypted string to a file called encrypted-secret in the main dir
  7. Configure the amounts to buy daily and your base FIAT currency in the serverless.yml
  8. Everything is ready, serverless deploy -v

You can now test the lambda function from AWS Console, if it all works, tonight at midnight you'll have some crypto in your Bitstamp balance :)

cryptolambda's People

Contributors

sscarduzio avatar

Watchers

James Cloos 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.