PicoLisp AWS CLI tool using OpenSSL and Curl

You can get it on GitHub.

This command line tool can be used to sign AWS Signature Version 4 requests and make calls to various AWS APIs.

GitHub release Build Status Dependency

  1. Requirements
  2. Usage
  3. Options
  4. Contributing
  5. Thanks
  6. Why

Requirements

Notes

The file libawscurl.l can be included as a library, rather than using the command line awscurl.l. Function are prefixed with awscurl- and variables are prefixed with *Aws_.

Usage

WARNING

There is currently no validation on command line arguments. Be careful the input you provide. See issue #1

Environment variables

The following environment variables are used:

If any of those environment variables are not set, the values will be read from $HOME/.aws/credentials using the [default] or $AWS_PROFILE profile.

Examples

./awscurl.l --service s3 --data @myfile.json --content-type 'application/json' --host awscurl-sample-bucket.s3.amazonaws.com --region us-east-1
# NOTE: for files > 1KB, disable Expect header with: --header Expect ""
./awscurl.l --query 'Action=DescribeRegions&Version=2013-10-15'
./awscurl.l --service execute-api --data '{"test":"json"}' --host '<prefix>.execute-api.us-east-1.amazonaws.com' --endpoint '/<resource>'

Options

Usage:		./awscurl.l [options]

Options:
  --help                    Show this help message and exit

  --data <data>             HTTP POST data (default: None)
  --endpoint <endpoint>     The API endpoint of the AWS service (default: /)
  --header <key> <value>    HTTP header data (default: None)
  --host <host>             The Host of the AWS service (default: ec2.amazonaws.com)
  --query <query>           The Query parameters of the AWS service (default: None)
  --region <region>         AWS region (default: us-east-1)
  --request <method>        Specify request method to use (default: GET)
  --service <service>       AWS service (default: ec2)
  --verbose                 Verbose flag (default: False)