Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

pricing.GetProducts includes breaking changes in v1.44.46 #4480

@bendrucker

Description

@bendrucker

Describe the bug

Calling pricing.GetProducts() returns a different type beginning in v1.44.46, breaking existing programs. The PriceList field in pricing.GetProductsOutput is a *string, where it was previously an aws.JSONValue, which is a map[string]interface{}. Clients relying on the previous type are broken by this change:

products, _ := pricing.GetProducts(input)
b, _ := json.Marshal(products.PriceList)
fmt.Println(string(b)

Where previously this would print a JSON array where each element is an object, it now prints a JSON array where each element is a string (a stringified JSON object).

Expected Behavior

Either behavior is acceptable, but I would expect the type signature for all functions to remain the same across all revisions within a major version.

Current Behavior

Currently, an array of strings is returned

Reproduction Steps

For any pricing query (input)

products, _ := pricing.GetProducts(input)
b, _ := json.Marshal(products.PriceList)
fmt.Println(string(b))

This prints an array of strings

Possible Solution

No response

Additional Information/Context

Originally reported in hashicorp/terraform-provider-aws#25771

SDK version used

v1.44.46

Environment details (Version of Go (go version)? OS name and version, etc.)

go version go1.18.3 darwin/arm64

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions