Skip to content

ram api not hitting the correct endpoint. #2501

Closed
@utkarsh-rai-sf

Description

Describe the bug

I am getting the following error on calling GetResourceShare. Looks like it is trying to hit an incorrect endpoint? ram..amazon.aws.com (with two .s after ram). I am not sure why that is.

operation error RAM: GetResourceShares, https response error StatusCode: 0, RequestID: , request send failed, Post "https://ram..amazonaws.com/getresourceshares": dial tcp: lookup ram..amazonaws.com: no such hosterr ===> error in creating ram share client operation error RAM: GetResourceShareAssociations, https response error StatusCode: 0, RequestID: , request send failed, Post "https://ram..amazonaws.com/getresourceshareassociations": dial tcp: lookup ram..amazonaws.com: no such host

I first faced this in the latest version (1.24.0). Then on switching versions I got the same error from 1.22.2 onwards. Trying a version before that gives the following error.

error in creating ram share client not found, ResolveEndpointV2

Expected Behavior

Expected behaviour is just to get a list of resources owned by a resource owner (SELF in my case).

Current Behavior

Current behaviour is the error I am facing.

Reproduction Steps

func foo() ([]types.ResourceShareAssociation, error) {
	cfg, err := config.LoadDefaultConfig(context.TODO())
	if err != nil {
		return nil, fmt.Errorf("error in loading default config %w", err)
	}
	client := ram.NewFromConfig(cfg)

	resourceShareInput := ram.GetResourceSharesInput{
		ResourceOwner: types.ResourceOwnerSelf,
	}
	_, err = client.GetResourceShares(context.TODO(), &resourceShareInput)
	print("err ====> ", err.Error())

	return nil, nil
}

Possible Solution

No response

Additional Information/Context

ran this code in a enterprise env.

AWS Go SDK V2 Module Versions Used

tried with all from github.com/aws/aws-sdk-go-v2/service/ram v1.22.2 to github.com/aws/aws-sdk-go-v2/service/ram v1.24.0

Compiler and Version used

go version go1.21.2 darwin/arm64

Operating System and version

macos 14.3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions