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
Bruno M.
@brunosmm
I tried to find an example of this in the git repo but didn't find any.
Bruno M.
@brunosmm
@lstone Can you share how you did it?
AlfredMadere
@AlfredMadere
I have successfully run the hello world micro instance tutorial but don't see it populate on my aws account when I look in the browser. Am I missing something?
Sam Baek
@sambaek-rapidai
Is there no more active development on Claudia? Running into some problems cause I want to utilize the max memory limits as well as setting up an endpoint as HTTP_PROXY (would love suggestions on if I can achieve the latter through Claudia; my initial research shows that it hardcodes AWS_PROXY making this not possible without forking or updating).
Laith Harb
@harblaith7
I am having troubles throwing errors with different status codes on Claudia. I know with Express JS it would look something like res.status(400).send(), but with claudia its just a return so I'm not sure how to tackle it
koushik110798
@koushik110798
Hello,
I am trying to update my lambda function with following command
claudia update --region us-west-2 --version qa2a --set-env env=qa2 --memory 4096 --timeout 30
But I get the following error
the memory value provided must be less than or equal to 3008
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.
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