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 #4560

Open
shubham-sp444 opened this issue Dec 27, 2023 · 2 comments
Open
Assignees
Labels
bug This issue is a bug. p3 This is a minor priority issue

Comments

@shubham-sp444
Copy link

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 ).

@shubham-sp444 shubham-sp444 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 27, 2023
@aBurmeseDev aBurmeseDev self-assigned this Jan 3, 2024
@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 Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. 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 Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

2 participants