When working with AWS CDK, there is a built-in function called addEventSource that allows you to easily add new SQS triggers (eventSources) to a lambda function. However, I'm curious if there is a way to access and modify the existing eventSources associated with a Lambda. For example, can we update, disable, or enable them? If not, is there a default method to delete these triggers so they can be recreated?
I am also open to any other suggestions or alternative approaches in this matter. Your input would be greatly appreciated.
I have already taken a look at the documentation but unfortunately did not come across any methods that could assist me with this specific scenario.