Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
polothy opened this issue Jan 29, 2024 · 4 comments · Fixed by #28934
Closed

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

polothy opened this issue Jan 29, 2024 · 4 comments · Fixed by #28934
Assignees
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. effort/medium Medium work item – several days of effort p1

Comments

@polothy
Copy link
Contributor

polothy commented Jan 29, 2024

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

@polothy polothy added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 29, 2024
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Jan 29, 2024
@holomekc
Copy link

The same applies for cn-north-1 and most likely the complete aws-cn partition. I think it is not ok that you deprecate something, but then the alternative is not even available. I am facing the same issues as described above. To make it even worse the rollback fails, which is not that much fun :(

@pahud
Copy link
Contributor

pahud commented Jan 30, 2024

related to #26947 (comment)

@pahud pahud added p1 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 30, 2024
@mrgrain
Copy link
Contributor

mrgrain commented Jan 30, 2024

The same applies for cn-north-1 and most likely the complete aws-cn partition. I think it is not ok that you deprecate something, but then the alternative is not even available. I am facing the same issues as described above. To make it even worse the rollback fails, which is not that much fun :(

Thanks for letting us know and I'm sorry we missed this.

Going to undeprecate.

@mergify mergify bot closed this as completed in #28934 Jan 31, 2024
mergify bot pushed a commit that referenced this issue Jan 31, 2024
### Issue

Closes #28919

### Reason for this change

In #28737 and #28783 we have deprecated various `logRetention` properties in favor of the new Logging Configuration feature for Lambda Functions. This new feature provides full control over the Lambda Function log group via the `logGroup` property.

However Logging Configuration is not available yet for all regions. Particularly GovCloud and CN regions (at the time this issue was created). For customers in of these regions there is currently no clear migration path.

We therefore revert the deprecation of previously deprecated properties.

### Description of changes

Revert the deprecation of previously deprecated `logRetention` properties.
Update documentation to be more explicit about the various options customers have.

### Description of how you validated changes

Documentation & annotation change only. This is a partial revert of the PRs linked about, with minor documentation updates.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

SankyRed pushed a commit that referenced this issue Feb 8, 2024
### Issue

Closes #28919

### Reason for this change

In #28737 and #28783 we have deprecated various `logRetention` properties in favor of the new Logging Configuration feature for Lambda Functions. This new feature provides full control over the Lambda Function log group via the `logGroup` property.

However Logging Configuration is not available yet for all regions. Particularly GovCloud and CN regions (at the time this issue was created). For customers in of these regions there is currently no clear migration path.

We therefore revert the deprecation of previously deprecated properties.

### Description of changes

Revert the deprecation of previously deprecated `logRetention` properties.
Update documentation to be more explicit about the various options customers have.

### Description of how you validated changes

Documentation & annotation change only. This is a partial revert of the PRs linked about, with minor documentation updates.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. effort/medium Medium work item – several days of effort p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants