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

AWS sdk is not accepting parameters as mentioned in the document #814

Closed
shubham-sp444 opened this issue Dec 27, 2023 · 13 comments
Closed
Assignees
Labels
bug Something isn't working closed-for-staleness This issue was closed because it didn't receive updates p3 response-requested This issue requires a response to continue service-api This issue pertains to the AWS API

Comments

@shubham-sp444
Copy link

shubham-sp444 commented Dec 27, 2023

Describe the bug

I'm using this SDK. https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/RedshiftServerless.html#createEndpointAccess-property

to create the VPC endpoint, but i get an error saying Unexpected key 'ownerAccount' found in params, this is not working locally as well as calling from the lambda.

I've checked with the types and the property ownerAccount is not mentioned in the types as well.

Screenshot 2023-12-26 at 7 11 53 PM

I've used node 14 and 16 both , and currently running on MacOS Ventura 13.4 with Apple M1 Pro chip ( for local ).

Please have a look and help me with this issue. thanks

Expected Behavior

It should accept the property as mentioned in the AWS document.

Current Behavior

error: UnexpectedParameter: Unexpected key 'ownerAccount' found in params
      at ParamValidator.fail (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:50:37)
      at ParamValidator.validateStructure (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:78:14)
      at ParamValidator.validateMember (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:89:21)
      at ParamValidator.validate (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:34:10)
      at Request.VALIDATE_PARAMETERS (/var/runtime/node_modules/aws-sdk/lib/event_listeners.js:166:42)
      at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
      at callNextListener (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
      at /var/runtime/node_modules/aws-sdk/lib/event_listeners.js:120:11
      at finish (/var/runtime/node_modules/aws-sdk/lib/config.js:396:7)
      at /var/runtime/node_modules/aws-sdk/lib/config.js:414:9 {
    code: 'UnexpectedParameter',
    time: 2023-12-26T13:22:29.456Z
  },

Reproduction Steps

Try to create an endpoint for the redshift serverless cluster using this SDK: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/RedshiftServerless.html#createEndpointAccess-property

Possible Solution

No response

Additional Information/Context

No response

SDK version used

v2 sdk version

Environment details (OS name and version, etc.)

I've used node 14 and 16 both , and currently running on MacOS Ventura 13.4 with Apple M1 Pro chip ( for local ).

@aBurmeseDev
Copy link
Member

Hi @shubham-sp444 - thanks for reaching out.

In order for me to understand the issue better, can you share your code calling the operation? I wasn't able to reproduce using the code with params below. Please note that ownerAccount is not a required param, per service API.

var params = {
  endpointName: 'vpcEndpoint',
  subnetIds: [
    'subnetID',
  ],
  workgroupName: 'testWorkGroup',
};

Looking forward to hear back,
John

@aBurmeseDev aBurmeseDev added response-requested This issue requires a response to continue p3 and removed needs-triage labels Jan 3, 2024
@shubham-sp444
Copy link
Author

Hi @shubham-sp444 - thanks for reaching out.

In order for me to understand the issue better, can you share your code calling the operation? I wasn't able to reproduce using the code with params below. Please note that ownerAccount is not a required param, per service API.

var params = {
  endpointName: 'vpcEndpoint',
  subnetIds: [
    'subnetID',
  ],
  workgroupName: 'testWorkGroup',
};

Looking forward to hear back, John

Hello @aBurmeseDev,

the params are

const params = {
endpointName: ,
subnetIds: ,
workgroupName: ,
resourceOwner:
vpcSecurityGroupIds: [],
};

Also please note that the resourceOwner is the another AWS account ( I've already added all the permissions ), this setup is done using [serverless privatelink setup with another account],(https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-connecting.html#serverless-cross-vpc), therefore i need to mention the another AWS account ( if the property is skipped, it checks for in my account ) i get a 404 as the resourceOwner is the customer's AWS account.

I've added all the permissions ( granted the permissions for all VPC in my account to access the Customer AWS account ), I can see a workgroup listed on my AWS console and i can create the endpoint from there , But when i use the SDK i get error.

Thanks for the reply, let me know if more details are required.

@github-actions github-actions bot removed the response-requested This issue requires a response to continue label Jan 5, 2024
@zshzbh
Copy link

zshzbh commented Aug 22, 2024

Hey @shubham-sp444 ,

Thanks for the response, as long as you are using the aws-sdk-js-v3, you have to follow the input param rules. 'resourceOwner' should not be put as a input parameter here. Could you please delete the 'resourceOwner' and try again?
Thanks!
Maggie

@zshzbh zshzbh added the response-requested This issue requires a response to continue label Aug 22, 2024
@zshzbh zshzbh self-assigned this Aug 22, 2024
Copy link

github-actions bot commented Sep 2, 2024

This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.

@github-actions github-actions bot added the closing-soon This issue will be closed soon label Sep 2, 2024
@shubham-sp444
Copy link
Author

shubham-sp444 commented Sep 2, 2024 via email

@github-actions github-actions bot removed closing-soon This issue will be closed soon response-requested This issue requires a response to continue labels Sep 3, 2024
@aBurmeseDev
Copy link
Member

Appreciate your response. As previously mentioned, resourceOwner is invalid parameter in service API. We, SDK team , don't have control over service models and if this's something you'd like to be considered, we can pass it along to service team on your behalf.

@aBurmeseDev aBurmeseDev added the closing-soon This issue will be closed soon label Sep 3, 2024
@shubham-sp444
Copy link
Author

shubham-sp444 commented Sep 3, 2024 via email

@github-actions github-actions bot removed the closing-soon This issue will be closed soon label Sep 4, 2024
@aBurmeseDev
Copy link
Member

Please share your complete minimal code with response logs and also note that Lambda runtime for Node 16 was deprecated on Jun 12, 2024. Upgrade your runtime and retry.

ownerAccount is also optional, try making a call without it for troubleshooting purpose.

@aBurmeseDev aBurmeseDev added the closing-soon This issue will be closed soon label Sep 5, 2024
@shubham-sp444
Copy link
Author

shubham-sp444 commented Sep 5, 2024 via email

@github-actions github-actions bot removed the closing-soon This issue will be closed soon label Sep 6, 2024
@aBurmeseDev
Copy link
Member

Can you share your minimal code and response output so that we can further help and investigate? The output with ownerAccount param and one without it. Thanks!

@aBurmeseDev aBurmeseDev added the closing-soon This issue will be closed soon label Sep 6, 2024
@shubham-sp444
Copy link
Author

shubham-sp444 commented Sep 6, 2024 via email

@aBurmeseDev aBurmeseDev added the service-api This issue pertains to the AWS API label Sep 6, 2024
@aBurmeseDev
Copy link
Member

Since the error comes from service API and need insights from Redshift, I'm going to reach out on your behalf and transfer this to our cross-sdk repo. We would still need your minimal repro code with both success and failed outputs.

@aBurmeseDev aBurmeseDev transferred this issue from aws/aws-sdk-js Sep 6, 2024
@aBurmeseDev aBurmeseDev added the response-requested This issue requires a response to continue label Sep 6, 2024
@github-actions github-actions bot removed closing-soon This issue will be closed soon response-requested This issue requires a response to continue labels Sep 6, 2024
@aBurmeseDev aBurmeseDev added the response-requested This issue requires a response to continue label Oct 15, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will be closed soon closed-for-staleness This issue was closed because it didn't receive updates and removed closing-soon This issue will be closed soon labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closed-for-staleness This issue was closed because it didn't receive updates p3 response-requested This issue requires a response to continue service-api This issue pertains to the AWS API
Projects
None yet
Development

No branches or pull requests

3 participants