Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 01 2016 23:48
    @gojko banned @codepreneur
koushik110798
@koushik110798
Thank you!
Asaduzzaman Himel
@asaduzzaman69
@gojko does Claudia support web socket api getway~?
Ghost
@ghost~58a7c5ded73408ce4f4b2a6b
claudia create --handler lambda.handler --deploy-proxy-api --region us-west-2 --name fileUploader
packaging files
TypeError: Cannot read property 'replace' of undefined
at expectedArchiveName (/Users/srn/.nvm/versions/node/v13.7.0/lib/node_modules/claudia/src/util/expected-archive-name.js:3:28)
at runWithConfig (/Users/srn/.nvm/versions/node/v13.7.0/lib/node_modules/claudia/src/util/pack-project-to-tar.js:10:56)
I keep getting that error when I try to do claudia create, any ideas why?
I tried changing the node versions, but no luck.
Ghost
@ghost~58a7c5ded73408ce4f4b2a6b
My lambda.js file seem ok too.
Aditya Avanth
@AdityaAvanth_twitter

I get the same error as @ghost~58a7c5ded73408ce4f4b2a6b
packaging files
TypeError: Cannot read property 'replace' of undefined
at expectedArchiveName (/Users/admin/.nvm/versions/node/v14.17.0/lib/node_modules/claudia/src/util/expected-archive-name.js:3:28)
at runWithConfig (/Users/admin/.nvm/versions/node/v14.17.0/lib/node_modules/claudia/src/util/pack-project-to-tar.js:10:56)

Can someone pls help me debug this?

Ryan Davis
@RyPoints
When constructing an AWS Lambda function with Claudia, the docs say to do exports.handler = function (event, context) { and then to reference the payload parameters sent to the function using event.parameterName but when I do that and print the parameters to the console, they all say "undefined." Anyone know why?
I'm pretty sure I have used it before like that. I am wondering if there's been changes since the docs were written...maybe event.somenewsubproperty.parameterName or something?
Ah, nevermind, already figured it out. Alamofire changed a bit and I wasn't passing the parameters.
npwoods
@npwoods
I'm trying to use Claudia.js for Lambda@Edge, but my Lambdas end up being wayyy to large. I tried downloading the Lambda package from AWS, and I see claudia inside my node_modules. I've confirmed that in my package.json, Claudia is a devDependency not a dependency. I'm probably doing something stupid
ziedmahdi
@ziedmahdi

Hello,
I wanted to explore callbackWaitsForEmptyEventLoop parameter so I have created a lambda with the below code

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

module.exports = api;

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

    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);

});

The strange thing is I don't see the 'after timeout' message.

even on other requests
image.png
image.png
ziedmahdi
@ziedmahdi
{
  "devDependencies": {
    "claudia": "^5.13.1"
  },
  "dependencies": {
    "claudia-api-builder": "^4.1.2"
  }
}
ziedmahdi
@ziedmahdi

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)

image.png
When I sent a third request (12 minutes later) the 'after timeout' message didn't appear
image.png
ziedmahdi
@ziedmahdi
@harblaith7 the easiest way is to use ApiResponse
return new ApiBuilder.ApiResponse('Request received', {'Content-Type': 'text/plain'}, 200);
Don MacKinnon
@dmackinn
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
@dmackinn
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
@jandppw
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
@tbenbrahim
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
@f.bonomini_gitlab
Hi Everyone! I have a question. When you use the claudia apiBuilder. Claudia create a lamba function for every enpoint?
Don MacKinnon
@dmackinn
@f.bonomini_gitlab it makes one function
David Simpson
@dvdsmpsn_twitter
Hello. Sorry for noob question... Are there any examples of Claudia and existing express apps written as ESM?
Gojko Adzic
@gojko
@/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
@cooperaustinj
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
@cooperaustinj
image.png
I see this answer from 2018. I guess that's probably still true.
Kayomarz
@kayomarz
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.
james-s-turner
@james-s-turner
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
@sneha8595

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?

Context:

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 (>=0.9.14.0) 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/

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

Hi
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
@Vibatious

Hi
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.
title
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
@johnbwilliams
Is Claudia still the best helper package to implement Lambda functions in Node.js?
thalesgadioli
@thalesgadioli
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
@johnmcdowell
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
@johnmcdowell
What am I missing?
Feng Yu
@abcfy2
Hi there. Is there any way to skip npm install during claudia create/update/pack ? Because my project is a typescript project, and I use @vercel/ncc to build and bundle all dependencies in dist/ directory. So node_modules/ directory is no use.
pruthvi menpara
@menpara_pruthvi_twitter
Does cloudia support lambda creation using ECR image?