Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ram api not hitting the correct endpoint. #2501

Closed
utkarsh-rai-sf opened this issue Feb 16, 2024 · 2 comments
Closed

ram api not hitting the correct endpoint. #2501

utkarsh-rai-sf opened this issue Feb 16, 2024 · 2 comments
Assignees

Comments

@utkarsh-rai-sf
Copy link

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

@utkarsh-rai-sf utkarsh-rai-sf added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 16, 2024
@RanVaknin
Copy link
Contributor

HI @utkarsh-rai-sf ,

You are not specifying a region.
https://ram..amazonaws.com/getresourceshareassociations
needs to be https://ram.<region>.amazonaws.com/getresourceshareassociations

Please refer to https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-the-aws-region

Thanks,
Ran~

@RanVaknin RanVaknin self-assigned this Feb 16, 2024
@RanVaknin RanVaknin added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Feb 16, 2024
@lucix-aws lucix-aws removed bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 This is a standard priority issue labels Feb 17, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants