serverless-framework

QueryString parameters are not getting validated even after setting the params to be required in serverless yaml

*爱你&永不变心* 提交于 2020-12-29 06:01:12
问题 I've configured API gateway via lambda function deployed with serverless framework. I've defined some queryStringParameters to be true in the yaml file. But the request is passing through the service even when the Required(mandatory) queryStringParams are not passed in URL. PFB the similar config. functions: functionName: name: serviceName handler: handler.handle events: - http: path: /path method: get request: parameters: querystrings: param1: true param2: true Seems serverless is not

How to bundle headless chromium module with AWS Lambda?

回眸只為那壹抹淺笑 提交于 2020-12-12 10:25:28
问题 I'm attempting to use Puppeteer with Lambda, however, on serverless deploy, the lambda errors out due to exceeding the 250mb unbundled package size limit. So, to get under the limit, I've switched to Puppeteer core which doesn't come packaged with chromium. This requires referencing a path to an executable to launch chrome. (e.g. puppeteer.launch({executablePath: headlessChromiumPath}) ); However, I'm not sure how to load a headless Chromium into my container so that I can later reference it.

Why does Serverless produce an Invalid Cross-device link Error when trying to package or deploy?

回眸只為那壹抹淺笑 提交于 2020-12-09 09:57:02
问题 When running either command: sudo serverless package or sudo serverless deploy I get the following traceback: Error: ERROR: Exception: Traceback (most recent call last): File “/var/lang/lib/python3.6/shutil.py”, line 550, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: ‘/tmp/pip-target-wqc5grcw/lib/python/setuptools’ -> ‘/var/task/setuptools’ During handling of the above exception, another exception occurred: Traceback (most recent call last): File “/var/lang

Why does Serverless produce an Invalid Cross-device link Error when trying to package or deploy?

蹲街弑〆低调 提交于 2020-12-09 09:56:59
问题 When running either command: sudo serverless package or sudo serverless deploy I get the following traceback: Error: ERROR: Exception: Traceback (most recent call last): File “/var/lang/lib/python3.6/shutil.py”, line 550, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: ‘/tmp/pip-target-wqc5grcw/lib/python/setuptools’ -> ‘/var/task/setuptools’ During handling of the above exception, another exception occurred: Traceback (most recent call last): File “/var/lang

Connecting Cassandra from AWS Lambda

旧时模样 提交于 2020-12-07 06:38:31
问题 We are checking the feasibility of migrating one of our application to Amazon Web Services (AWS) . We decide to use AWS API Gateway to expose the services and AWS Lambda (java) for back end data processing. The lambda function has to fetch a large amount of data from our database. Currently using Cassandra for data storage, which has been set up with in an EC2 instance and it has no public ip. Can anyone suggest a way to access Cassandra(EC2) from AWS Lambda using the private Ip ( 10.0.x.x)?

Is it possible to keep an AWS Lambda function warm?

一笑奈何 提交于 2020-12-01 09:24:07
问题 There are a few pieces of my app that cannot afford the additional 1-2 second delay caused by the "freeze-thaw" cycle that Lambda functions go through when they're new or unused for some period of time. How can I keep these Lambda functions warm so AWS doesn't have to re-provision them all the time? This goes for both 1) infrequently-used functions and 2) recently-deployed functions. Ideally, there is a setting that I missed called "keep warm" that increases the cost of the Lambda functions,

Is it possible to keep an AWS Lambda function warm?

穿精又带淫゛_ 提交于 2020-12-01 09:24:06
问题 There are a few pieces of my app that cannot afford the additional 1-2 second delay caused by the "freeze-thaw" cycle that Lambda functions go through when they're new or unused for some period of time. How can I keep these Lambda functions warm so AWS doesn't have to re-provision them all the time? This goes for both 1) infrequently-used functions and 2) recently-deployed functions. Ideally, there is a setting that I missed called "keep warm" that increases the cost of the Lambda functions,