You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used AWS sdk v3 to delete eventbridge Rule Target & Rule, the response returned with both httpStatusCode 200. But the rule does not removed.
I used this aws lambda function to invoke :
import{RemoveTargetsCommand,EventBridgeClient,DeleteRuleCommand}from"@aws-sdk/client-eventbridge";exportconsthandler=async(event,context)=>{try{// after delete an webhook, delete the rule target in event bridgeconsteventbridgeConfig={};constclient=newEventBridgeClient(eventbridgeConfig);constremoveTargetsParams={EventBusName: "lam",Force: true,Ids: [`my-id`],// requiredRule: "my-rule",// required};constcommand=newRemoveTargetsCommand(removeTargetsParams);constresponse=awaitclient.send(command);if(response.$metadata.httpStatusCode===200){// after the api destination is deleted, delete the rule in event bridgeconstdeleteRuleParams={EventBusName: process.env.EVENTBUS_NAME||'default',Force: true,Name: "my-rule",// required};constdeleterulecommand=newDeleteRuleCommand(deleteRuleParams);constresponse=awaitclient.send(deleterulecommand);}}catch(err){console.error(err);}};
Regression Issue
Select this option if this issue appears to be a regression.
lampvux
changed the title
Can not delete event bridge rule target & event bridge rule
Can not delete EventBridge rule target & EventBridge rule
Nov 18, 2024
Checkboxes for prior research
Describe the bug
I used AWS sdk v3 to delete eventbridge Rule Target & Rule, the response returned with both httpStatusCode 200. But the rule does not removed.
I used this aws lambda function to invoke :
Regression Issue
SDK version number
"@aws-sdk/[email protected]"
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
20.16.0
Reproduction Steps
use the lambda function above and test it with the id target rule & rule name
Observed Behavior
returned both success with delete target & rule :
But no rule was deleted. I checked in the AWS Dashboard Console
Expected Behavior
EventBridge Rule deleted
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: