-
Notifications
You must be signed in to change notification settings - Fork 239
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
aws_eventbridge_lambdam- Issue with cdk synth when using existing role for lambda and overrideWarningsEnabled=true #1057
Comments
Thanks - we'll take a look |
Error log: PS > cdk ls <--- Last few GCs ---> [16664:000002983F337660] 1430913 ms: Mark-sweep 3809.7 (4101.4) -> 3793.7 (4101.4) MB, 40288.8 / 0.0 ms (average mu = 0.057, current mu = 0.020) allocation failure; scavenge might not succeed <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory |
When we try to replicate this, we're not seeing the same error - but we are seeing an error. We'll fix the error we're seeing and let you know when it's available. You can try the new version and see if it addresses your issue as well. |
v2.50.0 corrects a problem when a role is provided in LambdaFunctionProps, please give it a try and see if it addresses your issue. Thanks. |
Correction - try 2.51.0, we had some version issues in 2.50.0 (unrelated to this issue) |
Hi @biffgaut, I tried with new version 2.51.0, but still seeing the same issue. I guess may be issue is with too many override warnings. I have around 5 stacks where I am using aws-solution-constructs and overriding default settings. Here's the error log: [14484:0000012F5C40A5C0] 1650071 ms: Mark-sweep 3834.0 (4101.3) -> 3818.2 (4101.5) MB, 14059.9 / 0.0 ms (average mu = 0.091, current mu = 0.025) a <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory |
Does it work when overrideWarnings is set to false? |
Yes, it works when overrideWarnings is set to false
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: biffgaut ***@***.***>
Sent: Wednesday, January 31, 2024 3:36:45 PM
To: awslabs/aws-solutions-constructs ***@***.***>
Cc: VivekReddy KondaReddy (Contractor) ***@***.***>; Author ***@***.***>
Subject: Re: [awslabs/aws-solutions-constructs] aws_eventbridge_lambdam- Issue with cdk synth when using existing role for lambda and overrideWarningsEnabled=true (Issue #1057)
You don't often get email from ***@***.*** Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Caution: This email is from an external sender. Please do not click links or open attachments unless you recognize the sender and know the content is safe. Forward suspicious emails to ***@***.***
Does it work when overrideWarnings is set to false?
—
Reply to this email directly, view it on GitHub<#1057 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDZZYNZIX7YQKIK5G65TSTDYRKTN3AVCNFSM6AAAAABCJZFRL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJZHEYTINBUGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Are all 5 stacks in the same CDK app? It does sound like that could stress memory. Is there any way you can isolate it to the point where you could post code that breaks? |
Yes all 5 stacks are under same cdk app. I will check with my team and try to post code. |
Any additional info you can provide to help us attempt to reproduce the error would be helpful, e.g.-
The Restaurant Management use case in our repo uses 4 independent stacks without a problem. |
aws_eventbridge_lambda - Using existing role for lambda has issue with cdk synth when overrideWarningsEnabled=true
Reproduction Steps
EventbridgeToLambda(
self,
"EventbridgeToLambda",
lambda_function_props=lambda_.FunctionProps(
code=lambda_.InlineCode(lambda_code),
handler="index.lambda_handler",
runtime=lambda_.Runtime.PYTHON_3_9,
role=iam.Role.from_role_arn(
self, id="x", role_arn="arn:aws:iam::numbers:path/rolename"
),
),
event_rule_props=events.RuleProps(
events.Schedule.rate(
Duration.hours(1)
)
),
)
Error Log
cdk ls or listing stack doesn't work with overrideWarningsEnabled=true
stack trace:
from aws_solutions_constructs.aws_eventbridge_lambda import (
File "\site-packages\aws_solutions_constructs
aws_eventbridge_lambda_init_.py", line 157, in
from .jsii import *
File "\site-packages\aws_solutions_constructs
aws_eventbridge_lambda_jsii_init.py", line 14, in
import aws_solutions_constructs.core.jsii
File "\site-packages\aws_solutions_constructs
core_init.py", line 96, in
from .jsii import *
File "\site-packages\aws_solutions_constructs
core_jsii_init.py", line 16, in
jsii_assembly = jsii.JSIIAssembly.load(
File "\site-packages\jsii_runtime.py", line 5
5, in load
kernel.load(assembly.name, assembly.version, os.fspath(assembly_path))
File "\site-packages\jsii_kernel_init.py"
, line 299, in load
self.provider.load(LoadRequest(name=name, version=version, tarball=tarball))
File "\site-packages\jsii_kernel\providers\pr
ocess.py", line 354, in load
return self._process.send(request, LoadResponse)
File "\site-packages\jsii_kernel\providers\pr
ocess.py", line 332, in send
self._next_message(), _ProcessResponse
File "\site-packages\jsii_kernel\providers\pr
ocess.py", line 251, in _next_message
return json.loads(self._process.stdout.readline(), object_hook=ohook)
KeyboardInterrupt
Error in atexit._run_exitfuncs:
ocess.py", line 295, in stop
self._process.stdin.close()
OSError: [Errno 22] Invalid argument
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: