I'm trying to use the aws price list API to get the price of a particular instance using getProducts, but it's been really frustrating to even get the price from the "response" given by the getProductsOutput. Everything is a awsJSONValue, and when I try to index into the awsJSONValue, I get a bunch of "map[] interface {}" issues that I have to continiously cast and it ends up looking really long and ugly (the command), and definitely not reproducible. Online, there seems to be no way to get the price from this output due to the "map[] interface{}" issues that is returned in the AWS JsonValue and I can't even index into the particular values.
Does anyone have any success in getting the "price" from the getProducts api call in aws price list using Golang? If so, can anyone please show me because I've been playing around and I feel like it shouldn't be so complicated. Is there any way I can parse through the aws.JSONValue via like a marshalling function or some sort? Simply put, I want something like this (but in Golang, not python): Use boto3 to get current price for given EC2 instance type
Thanks!