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
Click to show internal directories.
Click to hide internal directories.