Source of the Amazon
Permissions required for testing.
"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"
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 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"
Set AWS_DEBUG
to true
to enable amazonka debugging
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
Use all aws
implementations by default, where functionality falls short then fallback to
the amazonka-s3
implementations.
Use amazonka-s3
implementations by default and fall back to the aws
implementations
where amazonka falls short.
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
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