serverless / serverless/serverless

[AWS] Ability to preserve and reuse CloudWatch logs when stack is deleted and recreated

Open
#6,045 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat/aws-event-api-gateway enhancement
Dominant language
JavaScript
Stars
46.9k
Forks
5.7k
Avg merge
10h 7m
Merged PRs (30d)
57

Description

This is a Feature Proposal

Description

I want to preserve CloudWatch Logs resources when deleting a stack, and then re-use it when recreating a stack with (almost) same configuration.

I believe this is useful because of recently-introduced X-Ray support in API Gateway in serverless.
If I understand correctly, stacks should be removed then recreated to enable new features (X-Ray, Tags, etc) in API Gateway.
However, removing stack erases CloudWatch Logs of Lambdas, so users may not be able to see old logs, which is bad from operation perspective.

This feature may also be helpful for future API Gateway Stage-related features if those requires recreating stacks.

Similar or dependent issues:

  • #6055

Note

According to AWS, CloudFormation can retain resource when deleting stack. I am not sure it is possible to re-use existing same-name resources (CW Logs in this case) in newly-created stack.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AWS CloudFormation retention behavior and the Serverless stack deletion and recreation flow described in the issue. Determine whether retained CloudWatch Logs can be reused by a newly created stack, then define the framework behavior and compare it with the related #6055 context.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.