Skip to content

odg0318/aws-ec2-price

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-ec2-price

REST API for searching price of AWS EC2 instance

Installation

go get -u github.com/odg0318/aws-ec2-price

This package requires some dependancies:

Usage in golang

import github.com/odg0318/aws-ec2-price

pricing, err := price.NewPricing()
if err != nil {
	doSomething()
}

instances, err := pricing.GetInstances("us-east-1")
if err != nil {
	doSomething()
}

println(instances)

instance, err := pricing.GetInstance("us-east-1", "c4.large")
if err != nil {
	doSomething()
}

println(instance)

Run

aws-ec2-price --port=[PORT]

Default port is 8080.

Run with Docker

docker run -p 8080:8080 -d guri/aws-ec2-price

REST APIs

  • GET /ec2/regions/:region
  • GET /ec2/regions/:region/instance_types/:instance_type

References

About

REST API for searching price of AWS EC2 instance

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published