-
Notifications
You must be signed in to change notification settings - Fork 4k
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: CDK synth warning message presented as [object Object] #28936
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Comments
enpatrik
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Jan 31, 2024
pahud
changed the title
(aws-cdk-lib.aws_lambda): CDK synth warning message presented as [object Object]
lambda: CDK synth warning message presented as [object Object]
Jan 31, 2024
pahud
added
p2
effort/medium
Medium work item – several days of effort
and removed
effort/medium
Medium work item – several days of effort
needs-triage
This issue or PR still needs to be triaged.
labels
Jan 31, 2024
I'll take this. |
FYI, I created a ticket which slightly related to this one: #29887 |
I get a similar output from a CloudWatch Alarm resource: |
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
p2
Describe the bug
Warning message is expected to be shown, but the message is not correctly presented.
Expected Behavior
Warning message to be presented correctly.
`addPermission() has no effect on a Lambda Function with region=${this.env.region}, account=${this.env.account}, in a Stack with region=${Stack.of(this).region}, account=${Stack.of(this).account}. Suppress this warning if this is is intentional, or pass sameEnvironment=true to fromFunctionAttributes() if you would like to add the permissions.`
Warning message was added in: 2c21ea0#diff-527ac1e9edceb6fd9abb75249884fa31415393bbfed87ef28a2faa8a6a39b416R347 CDK v2.112.0
Current Behavior
CDK synth warning message:
Reproduction Steps
Run:
By following the advice from the warning message (that was supposed to be shown) and changing the code to use:
The warning is no longer shown (as expected).
Possible Solution
No response
Additional Information/Context
The warning message is still shown when setting
skipPermissions = true
:And the permissions are still added to the function, which was unexpected. Let me know if you consider this a bug and if you want me to create a separate ticket for that.
CDK CLI Version
CDK 2.124.0 (build 4b6724c)
Framework Version
No response
Node.js Version
v20.11.0
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
cdk synth verbose log:
Warning message was added in PR: #27861
The text was updated successfully, but these errors were encountered: