Signed AWS API requests with a curl like API.
Define an alias for the docker based awscurl command:
alias awscurl='docker run --rm '\
'-e AWS_ACCESS_KEY_ID '\
'-e AWS_SECRET_ACCESS_KEY '\
'-e AWS_SECURITY_TOKEN '\
allthings/awscurlDownload one of the OS dependent
release files, save it as
/usr/local/bin/awscurl and make it executable with
chmod +x /usr/local/bin/awscurl.
Set the following AWS CLI environment variables:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_SECURITY_TOKEN(optional)
AWS_SECURITY_TOKEN (= AWS_SESSION_TOKEN) is only required when using the
AWS Security Token Service.
The recommended way to store and provide AWS CLI credentials is by using aws-vault.
awscurl [-X request_method] [-H header:value] [-d post_data] URLawscurl -X POST -H x-api-key:example -d '{"data":"example"}' \
https://example.execute-api.eu-west-1.amazonaws.com/First, clone the project via go get and then switch into its source directory:
go get github.com/allthings/awscurl
cd "$GOPATH/src/github.com/allthings/awscurl"To cross-compile binaries for Linux, MacOS and Window, execute the following:
makeThe locally built binary can be installed at $GOPATH/bin/awscurl with the
following command:
make installThe uninstall command removes the binary from $GOPATH/bin/awscurl:
make uninstallTo clean up all build artifacts, run the following:
make cleanTo build the Docker image, run the following:
make dockerCreate a
GitHub personal access token
with repo scope and set it as GITHUB_TOKEN environment variable.
Commit your changes, create a git tag and then execute the following to release the binaries on GitHub:
make releaseReleased under the MIT license.