aws-req

command
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2020 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Command aws-req reads IAM credentials from standard environment variables to perform signed HTTPS requests to arbitrary AWS service URLs.

Usage:

aws-req --help

Environment variables:

AWS_ACCESS_KEY -OR- AWS_ACCESS_KEY_ID
AWS_SECRET_KEY -OR- AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN

EC2 API GET request:

aws-req https://ec2.amazonaws.com/?Action=DescribeAvailabilityZones&Version=2016-11-15

API Gateway POST request:

aws-req --method POST --body='{"key":"val"}' https://X.execute-api.us-east-1.amazonaws.com/prod/endpoint

API Gateway GET request w/ additional headers:

aws-req --header='{"key":"val"}' https://X.execute-api.us-east-1.amazonaws.com/prod/endpoint

Run aws-req via aws-exec-cmd to populate the environment with credentials from an EC2 instance role:

aws-exec-cmd role --chain instance -- aws-req --verbose https://ec2.amazonaws.com/?Action=DescribeAvailabilityZones&Version=2016-11-15

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL