Skip to content
Haskell library for AWS
Branch: master
Clone or download
devgrok Merge pull request #410 from ambiata/topic/generate-storage
generate storage info for ec2 types
Latest commit a44c325 Jun 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin bump ver to 0.1.6 Jun 18, 2019
doc benchmarks for multipart download Jun 22, 2015
framework bump ver to 0.1.6 Jun 18, 2019
lib gen new ec2 types Feb 1, 2019
mismi-autoscaling-core bump ver to 0.1.6 Jun 18, 2019
mismi-autoscaling bump ver to 0.1.6 Jun 18, 2019
mismi-cli bump ver to 0.1.6 Jun 18, 2019
mismi-cloudwatch-logs bump ver to 0.1.6 Jun 18, 2019
mismi-cloudwatch bump ver to 0.1.6 Jun 18, 2019
mismi-core
mismi-dynamodb bump ver to 0.1.6 Jun 18, 2019
mismi-ec2-core bump ver to 0.1.6 Jun 18, 2019
mismi-ec2 bump ver to 0.1.6 Jun 18, 2019
mismi-elb bump ver to 0.1.6 Jun 18, 2019
mismi-emr bump ver to 0.1.6 Jun 18, 2019
mismi-iam-core bump ver to 0.1.6 Jun 18, 2019
mismi-iam bump ver to 0.1.6 Jun 18, 2019
mismi-kernel bump ver to 0.1.6 Jun 18, 2019
mismi-openssl bump ver to 0.1.6 Jun 18, 2019
mismi-rds-core bump ver to 0.1.6 Jun 18, 2019
mismi-rds bump ver to 0.1.6 Jun 18, 2019
mismi-s3-core bump ver to 0.1.6 Jun 18, 2019
mismi-s3 bump ver to 0.1.6 Jun 18, 2019
mismi-sqs-core bump ver to 0.1.6 Jun 18, 2019
mismi-sqs bump ver to 0.1.6 Jun 18, 2019
mismi-sts bump ver to 0.1.6 Jun 18, 2019
.gitignore Upgrade Setup.hs Jan 14, 2016
.gitmodules update branch in modules May 23, 2018
.projectile Explicit credentials should never touch network. Sep 1, 2015
LICENSE Transition to agreed standard Ambiata open source license. Aug 17, 2017
README.md Update test AMI to a current version Jun 2, 2017
boris-git.toml Updating boris builds Sep 5, 2016
boris.toml Adding dynamodb subproject with specialized retry handler Feb 13, 2017

README.md

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
You can’t perform that action at this time.