Skip to content

(lambda): LoggingConfig is not available in GovCloud and maybe other partitions #28919

@polothy

Description

@polothy

Describe the bug

AWS CDK recently deprecated logging retention options on Lambda Function construct. When I tried to fix the deprecations, it worked fine until GovCloud deployment. CloudFormation reported this error:

Resource handler returned message: "LoggingConfig is not supported in us-gov-west-1. Remove LoggingConfig value from your request and try again

Original discussion started in #26947

Expected Behavior

Not entirely sure, I had to write a condition in my code to use the deprecated options for GovCloud and use the new LogGroup option elsewhere.

Current Behavior

CloudFormation reported this error:

Resource handler returned message: "LoggingConfig is not supported in us-gov-west-1. Remove LoggingConfig value from your request and try again

Reproduction Steps

Use LogGroup on the Lambda Function construct and deploy that into GovCloud.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.118.0

Framework Version

No response

Node.js Version

18

OS

macOS Sonoma

Language

Python

Language Version

3.11

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-lambdaRelated to AWS LambdabugThis issue is a bug.effort/mediumMedium work item – several days of effortp1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions