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
But the lambda function can have memory 10240
Any suggestions would be appreciated
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.