Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Aug 01 2016 23:48
    @gojko banned @codepreneur

when I tried with callbackWaitsForEmptyEventLoop=false,

var ApiBuilder = require('claudia-api-builder'),
    api = new ApiBuilder();

module.exports = api;

api.any('/test', function (request) {
    request.lambdaContext.callbackWaitsForEmptyEventLoop = false;

    var prefix = request.proxyRequest.queryStringParameters.id;
    console.log('hello: ' + prefix);
    setTimeout(function () {
        console.log('after timeout: ' + prefix);
    }, 5000);

    return new ApiBuilder.ApiResponse('OK ' + prefix, {'X-Version': '202', 'Content-Type': 'text/plain'}, 200);


I got 'after timeout' but only when I sent two request (19 sec between each)

When I sent a third request (12 minutes later) the 'after timeout' message didn't appear
@harblaith7 the easiest way is to use ApiResponse
return new ApiBuilder.ApiResponse('Request received', {'Content-Type': 'text/plain'}, 200);
Don MacKinnon
Does anyone have working examples of accepting a multipart/form-data POST request containing binary content such as a png/jpeg? Specifically I'm trying to pass along a form value as well as a image file via a Postman post to an claudia api endpoint but I'm not seeing anything to indicate it's being attached to the request object. I'm using claudia-api-builder not the express wrapper.
Don MacKinnon
I was able to get it working on lambda with busboy. For anyone who comes across this, I was never able to get it working locally via the claudia-local-api package, it appears multi-part forms are not supported with that currently
Jan Dockx
Does anybody have any idea how to deal with ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:…, which suddenly started happening, after a 150 successful claudia updates by CI? See claudiajs/claudia#226.
Tony BenBrahim
I am thinking of submitting a PR to add support for specifying the architecture during create or update. This is a new feature introduced yesterday (https://aws.amazon.com/blogs/aws/aws-lambda-functions-powered-by-aws-graviton2-processor-run-your-functions-on-arm-and-get-up-to-34-better-price-performance/)
Fabiano Bonomini
Hi Everyone! I have a question. When you use the claudia apiBuilder. Claudia create a lamba function for every enpoint?
Don MacKinnon
@f.bonomini_gitlab it makes one function
David Simpson
Hello. Sorry for noob question... Are there any examples of Claudia and existing express apps written as ESM?
Gojko Adzic
@/all claudia 5.14.0 is now on NPM, with support for arm/graviton2 architecture deployment and a few long deserved bugfixes. check out https://github.com/claudiajs/claudia/blob/master/RELEASES.md#5140-18-october-2021 for more information
Austin Cooper
Can anyone tell me if there's an answer to this question: claudiajs/claudia#171
Essentially, is there a way to do an authorizationType: 'AWS_IAM' equivalent with --deploy-proxy-api
Austin Cooper
I see this answer from 2018. I guess that's probably still true.
Does anyone know how to cleanup/remove whatever is done by claudia add-s3-event-source. I understand it can be done via the Bucket Event notifications property but how do we do it using claudia? Thanks.
Hey @gojko I have upgraded to 5.14.0 but I'm still seeing claudiajs/claudia#226 as an issue. Should I open a new issue or can 226 be re-opened?
Sneha Reddy

Does anyone know if the lambda functions deployed using Claudia face any issues while updating due to the latest states rollout or is already taken care of?


All AWS CLIs and SDKs have supported monitoring Lambda function states transitions since the original announcement in 2019. Infrastructure as code tools such as AWS CloudFormation, AWS SAM, Serverless Framework, Hashicorp Terraform (>=2.40.0), and Cloud Custodian (>= also already support states. Customers using these tools do not need to take any action as part of this, except for one recommended service role policy change for AWS CloudFormation customers (see Updating CloudFormation’s service role below).

However, there are some customers using SDK-based automation workflows or calling Lambda’s service APIs directly, that must update those workflows for this change. To allow time for testing this change, we are rolling it out in a phased model, much like the initial rollout for VPC attached functions. We encourage all customers to take this opportunity to move to the latest SDKs and tools available.

Reference: https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/

@sneha8595 yes : claudiajs/claudia#226 is caused by the changes to states
1 reply
Chant Long
Does Claudia support deploying API Gateway with a Resource Policy?

I need one urgent solution on one issue.
I have converted my entire nodejs project to aws lambda using this claudia.

Everything look gook. but while sending base64 content which is arround 500KB, giving me payloadTooLarge error.

While running service it workd fine...but aws is not allowing me to send this request.

What should be the fix?

is aws lambda function created by claudia synchronous or async?

Could anyone please help on this issue
Love Varshney

I am facing issue with claudia update comment
When I run update command it proceeds and after 'validating package' statement it start to print garbage on my terminal.
I have attached the image and this goes on, and never terminate until I terminate the command

It is working 10 days back

john williams
Is Claudia still the best helper package to implement Lambda functions in Node.js?
hi.. i use claudiajs at lambda function for telegram. well, its a chatbot.. but, i want to use some telegram apis.. is it possible? example: start a chat using the chatbot (with the sendMessage from telegram bot api)
John McDowell
Hi, I upgraded npm and claudia in a codebase that has worked fine, and now I get a problem where during claudia package validation it tries to load my package and fails because aws-sdk isn't there, which is correct because it's not supposed to be because aws lambda already has it.
Surely I must be missing something, as this is a core use case for claudia, right? Uploading a lambda that doesn't include aws-sdk per aws' instructions not to do so?
The error looks like this:
claudia update --no-optional-dependencies --version test --npm-options="--omit=dev --omit=optional"
validating package
Error: Cannot find module 'aws-sdk'
Require stack:
John McDowell
What am I missing?