Skip to content

Maintenance: create own LogGroup resource in integration tests #3013

@dreamorosi

Description

@dreamorosi

Summary

As part of our integration tests we deploy a number of AWS Lambda functions. For each one of these, we also create a LogGroup.

Currently we are delegating the creation of this log group to AWS CDK and setting the log retention on this log group using the logRetention property in the NodejsFunction construct.

Up until a few months ago, this was the only method to set a log retention and it requires a CDK-managed custom resource to override the log retention after the resource is created.

With somewhat recent changes in CDK we can now specify the log retention when creating the log group, and tell the Lambda function to use this log group for its logging needs.

Why is this needed?

So that we can reduce the amount of resources deployed for each integration test run.

Which area does this relate to?

Tests

Solution

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)testsPRs that add or change tests

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions