All Projects → haskell-mafia → mismi

haskell-mafia / mismi

Licence: BSD-3-Clause license
Haskell library for AWS

Programming Languages

haskell
3896 projects
Roff
2310 projects
shell
77523 projects
python
139335 projects - #7 most used programming language

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-a1abbfc2"
`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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].