GithubHelp home page GithubHelp logo

erikd-ambiata / mismi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haskell-mafia/mismi

0.0 2.0 0.0 790 KB

Haskell library for AWS

License: Apache License 2.0

Shell 3.69% Haskell 67.16% Roff 29.16%

mismi's Introduction

mismi

Source of the Amazon

mismi

Permissions

Permissions required for testing.

AutoScaling

"autoscaling:AttachLoadBalancers"
"autoscaling:CreateAutoScalingGroup"
"autoscaling:CreateLaunchConfiguration"
"autoscaling:CreateOrUpdateTags"
"autoscaling:DeleteAutoScalingGroup"
"autoscaling:DeleteLaunchConfiguration"
"autoscaling:DescribeAutoScalingGroups"
"autoscaling:DescribeAutoScalingInstances"
"autoscaling:DescribeLaunchConfigurations"
"autoscaling:DescribeLoadBalancers"
"autoscaling:DescribeTags"
"autoscaling:DetachLoadBalancers"
"autoscaling:SetDesiredHealth"
"autoscaling:UpdateAutoScalingGroup"

AWS Testing

Running tests

Optional environment variables that can be used to disable testing on AWS resources, all variables default to 'true'.

  • AWS_TEST_AUTOSCALING
  • AWS_TEST_S3

Resources

Resources that are used when running test are configurable via:

`AWS_TEST_SECURITY_GROUP` - defaults to "ci.ci.node"
`AWS_TEST_IMAGE_ID` - defaults to "ami-bc3611df"
`AWS_TEST_IAM_ROLE` - defaults to "ci.ci.node"
`AWS_TEST_BUCKET` - defaults to "ambiata-dev-view"

Debugging

Amazonka - environment variable

Set AWS_DEBUG to true to enable amazonka debugging

Amazonka - manually

See Mismi.Control to add a logger to the runner

runAWS :: Region -> AWS a -> EitherT AWSError IO a
runAWS r a = do
  lgr <- newLogger Trace stdout
  e <- liftIO $ AWS.getEnv r Discover <&> envLogger .~ lgr
  runAWSWithEnv e a

mismi-s3

Current situation

Use all aws implementations by default, where functionality falls short then fallback to the amazonka-s3 implementations.

Future plans

Use amazonka-s3 implementations by default and fall back to the aws implementations where amazonka falls short.

STS

The "X-Amz-Security-Token" header is only supported by amazonka and therefore all required sts functionality will have to be implemented in terms of amazonka-s3.

Running amazonka AWST - Mismi.Control.Amazonka

runAWSWithCreds :: Region -> AccessKey -> SecretKey -> Maybe SecurityToken -> Maybe UTCTime -> AWS a -> EitherT AWSError IO a

Command line

The mismi-cli module provides a command-line tool for interacting with s3 resources

cd mismi-cli
./mafia build
alias s3="dist/build/s3/s3"

s3 --help

Available commands:
  upload                   Upload a file to s3.
  download                 Download a file from s3.
  copy                     Copy a file from an S3 address to another S3 address.
  move                     Move an S3 address to another S3 address
  exists                   Check if an address exists.
  delete                   Delete an address.
  write                    Write to an address.
  read                     Read from an address.
  cat                      Stream data from an address.
  size                     Get the size of an address.
  sync                     Sync between two prefixes.
  ls                       Stream a recursively list of objects on a prefix

mismi's People

Contributors

charleso avatar domdere avatar eduardsergeev avatar erikd-ambiata avatar etorreborre avatar huwcampbell avatar jacobstanley avatar markhibberd avatar michaelneale avatar nhibberd avatar olorin avatar phickey avatar raronson avatar thumphries avatar tmcgilchrist avatar

Watchers

 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.