Open eyal-solomon1 opened 1 year ago
Hey @ajredniwja can you assist here ?
Hey @eyal-solomon1 thanks for opening this issue, I was not able to reproduce the issue:
I used the code below:
import { EC2Client, RevokeSecurityGroupIngressCommand } from "@aws-sdk/client-ec2"; // ES Modules import
(async() => {
const client = new EC2Client("region: us-west-2");
try {
const input = {
SecurityGroupRuleIds: ['sgr-984'], // SG rule id
GroupId: "sg-0903093", // SG id
};
const command = new RevokeSecurityGroupIngressCommand(input);
const r = await client.send(command);
console.log(r);
} catch (e) {
console.log(e);
}
})();
Response:
{
'$metadata': {
httpStatusCode: 200,
requestId: '3s9pcebc-n778-3e30-92cf-ba669cc8700',
extendedRequestId: undefined,
cfId: undefined,
attempts: 1,
totalRetryDelay: 0
},
Return: true,
UnknownIpPermissions: undefined
}
Version client:
"dependencies": {
"@aws-sdk/client-ec2": "^3.199.0"
}
Can you try and run the same with the latest version?
Only difference is I am not on M1 mac but I dont think that should make any difference.
GroupId
Hi @ajredniwja ,thanks for your response
updated sdk package to @aws-sdk/client-ec2@3.204.0
and ran it with node v16.16.0
getting this error now :
Error: config.endpointProvider is not set.
at getEndpointFromInstructions (/Users/../deployment_cli_tool/node_modules/@aws-sdk/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js:9:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
config initialization :
const client = new EC2Client();
Describe the bug
Trying to remove a rule from a specific security group but getting an error
Expected Behavior
Getting response as specified here - SDK docs with
Return
key astrue
Current Behavior
Error log :
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
SDK version used
@aws-sdk/client-ec2@3.178.0
Environment details (OS name and version, etc.)
Mac M1 macOS Monterey 12.6