aws / aws/aws-cdk

(hotswap): We don't support attributes of the 'AWS::Logs::LogGroup' resource.

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

Description

### Describe the bug

I get the following warning when deploying with `pnpm exec cdk deploy --all --asset-parallelism true --hotswap-fallback true`
```
Could not perform a hotswap deployment, because the CloudFormation template could not be resolved: We don't support attributes of the 'AWS::Logs::LogGroup' resource. This is a CDK limitation. Please report it at https://github.com/aws/aws-cdk/issues/new/choose
```

### Regression Issue

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

### Last Known Working CDK Library Version

_No response_

### Expected Behavior

Hotswapping should happen ideally

### Current Behavior

No hotswap performed

### Reproduction Steps

I havent produced an autonomous code snippet/repo reproducing exactly this issue.

However, I set an `accessLogDestination` using a `LogGroup` to a API Gateway `Stage` in my code:
```typescript
const stage = new Stage(this, `${id}Stage`, {
accessLogDestination: new LogGroupLogDestination(new LogGroup(stack, `${resourcePrefix}-apigateway-loggroup-${resourceSuffix}`, {
logGroupName: `/aws/apigateway/${resourcePrefix}-loggroup-${resourceSuffix}`,
removalPolicy: RemovalPolicy.DESTROY,
retention: RetentionDays.ONE_MONTH
})),
accessLogFormat: AccessLogFormat.jsonWithStandardFields(),
...
})
```

### Possible Solution

_No response_

### Additional Information/Context

Related issues regarding hotswapping and the `We don't support attributes of the * resource` warning:
* https://github.com/aws/aws-cdk/issues/35688
* https://github.com/aws/aws-cdk/issues/35356
* https://github.com/aws/aws-cdk/issues/32199
* https://github.com/aws/aws-cdk/issues/30841

_(there are other similar ones)_

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

2.214.0

### AWS CDK CLI version

2.1030.0

### Node.js Version

22.20.0

### OS

Ubuntu through WSL2

### Language

TypeScript

### Language Version

5.9.2

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the hotswap deployment path invoked by `pnpm exec cdk deploy --all --asset-parallelism true --hotswap-fallback true`, focusing on resolution of `AWS::Logs::LogGroup` attributes. Compare the related issues listed in the report and reproduce the `Stage` configured with `LogGroupLogDestination`; done means hotswap proceeds without the unsupported-attributes warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.