samiriff / aws-query-requests-helper

Modular code that will allow users to directly make AWS Query Requests without relying on any particular SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Query Requests

This project contains modular code that will allow users to directly make AWS Query Requests without relying on any particular SDK, and contains all the logic required to digitally sign each request with your AWS keys, using the Signature 4 Signing Process. This will be useful if you are implementing calls based on the AWS OpenAPI spec (Sample API spec for EC2)

Getting Started

Project Files

This project consists of 2 parts:

  • aws_query_requests_test.py - Standalone python program to test signed HTTP requests to the AWS Query Requests API. This internally calls the modular code present in aws_query_requests.py
  • AWS Query Requests.ipynb - Jupyter notebook for testing signed HTTP requests to the AWS Query Requests API using normal HTTP requests as well as boto3 SDK. This notebook is good if you are experimenting with some requests and want to see intermediate outputs.

Running and Testing

  • Create a file named credentials.json in the project root directory and save your AWS access key and secret key in it.
  • Run the following command to make signed AWS Query Requests:
     python aws_query_requests_test.py
    

Tested APIs

The following API endpoints have been tested for EC2 instances:

  • DescribeRegions
  • DescribeKeyPairs
  • RunInstances
  • DescribeInstances
  • TerminateInstances
  • DescribeDBInstances
  • CreateDBInstance
  • DeleteDBInstance

Useful Links

About

Modular code that will allow users to directly make AWS Query Requests without relying on any particular SDK


Languages

Language:Jupyter Notebook 82.7%Language:Python 17.3%