aws / aws/aws-cdk

logRetention: Deprecated or not?

Open
#36,106 5 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-logs bug effort/medium p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

Hi All,

I have looked through various previous GitHub PRs and issues, and I'd like to confirm whether `logRetention` is going to be deprecated again, or if it is staying.

At the moment, we get:
```
[WARNING] aws-cdk-lib.aws_lambda.FunctionOptions#logRetention is deprecated.
use `logGroup` instead
This API will be removed in the next major release.
```

We can move to `logGroup`, but the reason why I'm asking is I've seen that it got reverted, so I'm just curious if its an old message which can be discarded.

Thanks for your help!

REF: #28783 #28737 #28934 #28783

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Last Known Working CDK Library Version

_No response_

### Expected Behavior

Either this message to be accurate, or discarded.

### Current Behavior

Included above

### Reproduction Steps

Use `logRetention` in any capacity.

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### AWS CDK Library version (aws-cdk-lib)

2.221.1

### AWS CDK CLI version

N/A

### Node.js Version

N/A

### OS

N/A

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the logRetention API behavior and the referenced issues #28783, #28737, and #28934. Determine whether the deprecation warning is still accurate for aws-cdk-lib 2.221.1; done means the warning and the documented replacement agree with the intended API status.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.