Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API retainDeployments param does not work #3648

Open
tchcxp opened this issue Jan 30, 2024 · 3 comments
Open

API retainDeployments param does not work #3648

tchcxp opened this issue Jan 30, 2024 · 3 comments

Comments

@tchcxp
Copy link

tchcxp commented Jan 30, 2024

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,

@jayair
Copy link
Contributor

jayair commented Jan 31, 2024

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

@tchcxp
Copy link
Author

tchcxp commented Jan 31, 2024

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

@jayair
Copy link
Contributor

jayair commented Feb 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants