sst / sst

Build modern full-stack applications on AWS

Home Page:https://sst.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API retainDeployments param does not work

tchcxp opened this issue · comments

Hi there,

I just found that the retainDeployments in the API CDK construct doesn't work.

The stack for a demo is below:

import { ApiGatewayV1Api } from 'sst/constructs'

 const api = new ApiGatewayV1Api(stack, 'Api', {
    cdk: {
      restApi: {
        restApiName: 'demo-api',
        description: 'Demo API',
        retainDeployments: true,
      },
    },
  })

api.addRoutes(stack, {
    ... 
})

Then jump to the AWS console, I can see only one deployment is there, no matter how many new deployments/changes have been made.

image

Can someone please look into it? Keeping the old deployment resources is extremely important for the production environment.

Thanks,

commented

Where did you find the retainDeployments prop btw? Can I see a link to it?

Where did you find the retainDeployments prop btw? Can I see a link to it?

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApiProps.html#retaindeployments

commented

Ah I see. Let me ask the team to take a look.