Skip to content

Set 30-day retention on API Gateway access log group - #1355

Open
jboolean wants to merge 1 commit into
masterfrom
api-gateway-access-logs
Open

Set 30-day retention on API Gateway access log group#1355
jboolean wants to merge 1 commit into
masterfrom
api-gateway-access-logs

Conversation

@jboolean

@jboolean jboolean commented May 2, 2026

Copy link
Copy Markdown
Owner

Codifies the 30-day retention policy already applied via CLI to /aws/api-gateway/fourtiesnyc-production, so it survives stack redeployments.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32307d77e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/serverless.yml
Comment on lines +162 to +166
ApiGatewayAccessLogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: /aws/api-gateway/${self:service}-${sls:stage}
RetentionInDays: 30

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove duplicate API Gateway access log group resource

Defining ApiGatewayAccessLogGroup here creates a second AWS::Logs::LogGroup with the same name that Serverless already generates when provider.logs.restApi.accessLogging is enabled (/aws/api-gateway/${service}-${stage}), so CloudFormation can fail updates with a “resource already exists”/name conflict during deploy. In this config, provider.logs.restApi.accessLogging is on, so this extra resource is not just redundant—it is deploy-blocking for stack updates.

Useful? React with 👍 / 👎.

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

Successfully merging this pull request may close these issues.

1 participant