Reputation: 2546
I have added an S3 lambda trigger in my AWS Amplify project. However when I try to remove that lambda trigger using amplify remove function
, it shows the following error.
Resource cannot be removed because it has a dependency on another resource
Dependency: S3 - s3xxxxxxxx
An error occurred when removing the resources from the local directory
AWS Amplify Documentation does not have a clear guide to remove lambda functions. So, how can I remove the function without removing the S3 resource?
Upvotes: 5
Views: 5283
Reputation: 2546
amplify update storage
. Then choose the options that you configured previously. When Amplify CLI prompts to select an option, choose Remove the Trigger
.Then run amplify push
to sync local changes with the cloud.
Now, if we run amplify remove function
again, and choose the S3 trigger function. It will execute without an error. Just remember to do another amplify push
to sync and remove the function at last.
Upvotes: 7