-
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
Can't increase lambda timeout on custom resource lambda #3272
Comments
Hi @abelmokadem! Thank you for contributing! After reviewing the feature request, I am wondering if this is what you are looking for. If not, let me know, and I will add this to the FR queue. |
@abelmokadem Just like @NGL321 suggested.... cdk switched form |
I see that I forgot to mention what my custom resource actually is. I'm talking about this resource https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_custom-resources.AwsCustomResource.html |
Can you detail your use case? How is it that an API call takes more than 3 seconds to complete? |
|
@SomayaB I hope I can help out clarifying this issue a bit. I had the exact same situation where I needed to provide a custom Cognito UserPool Domain through CDK. I created an I also experienced a Lambda execution time-out on this AWS API call. To me it is entirely unclear why this API call takes longer than 3 seconds to complete as there is no information available (either the Lambda function just get killed because of the execution time-out and that is what you see in the logs or it just works if the execution time-out is extended long enough), but I personally see no reason why an API call shouldn't take any longer than 3 seconds. The case @abelmokadem makes is that since Hope it helps in understanding this issue. |
I'm of course OK to expose this prop in |
Since the The only concern to me in that case however is that this issue might pop up again in rare situations and people would have a hard time finding the solution for it. So maybe both solutions, a higher default execution time-out to cover most situations and the option to override it with a short comment to state its purpose and a hint to help the few unlucky users when they run into this? |
Default timeout is now 6 seconds. Closes aws#3272
I'm submitting a ...
What is the current behavior?
If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
The current timeout for custom resource lambda is set to 3 seconds. My lambda for the custom resource is taking a bit longer than 3 seconds to complete.
What is the expected behavior (or behavior of feature suggested)?
I would like to be able to configure the lambda timeout for custom resource, or see an increase in the default timeout value.
What is the motivation / use case for changing the behavior or adding this feature?
To support lambdas that might run into timeout issue. If the timeout happens 3 times, which it did for me, you will end up with a stack that is stuck for an hour.
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
I managed to overwrite the value with:
Now it is working for me. The execution time of the lambda ended up being 3400ms.
Cheers!
The text was updated successfully, but these errors were encountered: