Add DeletionPolicy to Function

Viewed 150

I need to add a DeletionPolicy to my functions created with the serverless framework. Override AWS CloudFormation Resource suggests that I should be able to do something like the following, but it doesn't work:

functions:
  my-function:
    name: my-function
    handler: index.handler

resources:
  extensions:
    MyDashFunctionLambdaFunction:
      DeletionPolicy: Retain

1 Answers

Turns out we were on a rather old version of serverless. This was added in version 1.65.0.

Related