aws-lambda

Is there a way to invoke AWS Lambda synchronously from node.js?

妖精的绣舞 提交于 2020-07-20 17:12:12
问题 I'm trying to run a specific function from an existing app via AWS Lambda, using the JS SDK to invoke Lambda from my node.js app. Since I'm overwriting the existing function, I'll have to keep its basic structure, which is this: overwrittenFunction = function(params) { //get some data return dataArray; } ..so I need to end up with an array that I can return, if I'm looking to keep the underlying structure of the lib I use the same. Now as far as I know, Lambda invocations are asynchronous,

FFmpeg: Pipe segments to s3

£可爱£侵袭症+ 提交于 2020-07-19 06:03:46
问题 I'd like to pipe ffmpeg segments to s3 without writing them to disk. ffmpeg -i t2.mp4 -map 0 -c copy -f segment -segment_time 20 output_%04d.mkv Is it possible to modify this command so that ffmpeg writes segments to an s3 bucket? Something like this perhaps? ffmpeg -i t2.mp4 -map 0 -c copy -f segment -segment_time 20 pipe:1 \ | aws s3 cp - s3://bucket/output_%04d.mkv When I run the command above I receive this error Could not write header for output file #0 (incorrect codec parameters ?):

libffi-d78936b1.so.6.0.4: cannot open shared object file Error on AWS Lambda function

空扰寡人 提交于 2020-07-18 22:17:09
问题 I am trying to deploy a python Lambda package with watson_developer_cloud sdk. Cryptography is one of many dependencies this package have. I have build this package on Linux machine. My package includes .libffi-d78936b1.so.6.0.4 hidden file too. But it is still not accessible to my lambda function. I am still getting 'libffi-d78936b1.so.6.0.4: cannot open shared object file' Error. I have built my packages on Vagrant server, using instructions from here: https://docs.aws.amazon.com/lambda

libffi-d78936b1.so.6.0.4: cannot open shared object file Error on AWS Lambda function

二次信任 提交于 2020-07-18 22:16:44
问题 I am trying to deploy a python Lambda package with watson_developer_cloud sdk. Cryptography is one of many dependencies this package have. I have build this package on Linux machine. My package includes .libffi-d78936b1.so.6.0.4 hidden file too. But it is still not accessible to my lambda function. I am still getting 'libffi-d78936b1.so.6.0.4: cannot open shared object file' Error. I have built my packages on Vagrant server, using instructions from here: https://docs.aws.amazon.com/lambda

libffi-d78936b1.so.6.0.4: cannot open shared object file Error on AWS Lambda function

↘锁芯ラ 提交于 2020-07-18 22:16:10
问题 I am trying to deploy a python Lambda package with watson_developer_cloud sdk. Cryptography is one of many dependencies this package have. I have build this package on Linux machine. My package includes .libffi-d78936b1.so.6.0.4 hidden file too. But it is still not accessible to my lambda function. I am still getting 'libffi-d78936b1.so.6.0.4: cannot open shared object file' Error. I have built my packages on Vagrant server, using instructions from here: https://docs.aws.amazon.com/lambda

Is there a way to assign a Static IP to a AWS Lambda without VPC?

怎甘沉沦 提交于 2020-07-17 11:55:52
问题 I am looking to assign a static IP to my Lambda which is being invoked via the API gateway. This is required because, the downstream system that i invoke from this lambda accepts web requests only from a Whitelisted IP. I am successful in achieving this via the VPC that i associate with my lambda. But VPC introduces a bad cold-start time which sometime ranges 12-16seconds. So i am looking for a way to prevent this cold start from the VPC, but at the same time assign a static IP to the lambda.

Is there a way to turn on SageMaker model endpoints only when I am receiving inference requests

左心房为你撑大大i 提交于 2020-07-10 10:25:50
问题 I have created a model endpoint which is InService and deployed on an ml.m4.xlarge instance. I am also using API Gateway to create a RESTful API. Questions: Is it possible to have my model endpoint only Inservice (or on standby) when I receive inference requests? Maybe by writing a lambda function or something that turns off the endpoint (so that it does not keep accumulating the per hour charges) If q1 is possible, would this have some weird latency issues on the end users? Because it

Trouble updating IAM to allow AWS Glue to the AWS Secrets Manager

倖福魔咒の 提交于 2020-07-10 09:56:07
问题 I am working on a project that requires that an AWS Glue Python script access the AWS Secrets Manager. I tried giving Glue permissions to do this via IAM, but I don't see how; I can see the permissions strings showing that Lambda has access but I don't see a way to edit them. I tried creating a new role that had the right permissions but when I went to attach it seemed to have disappeared ... My fallback workaround is to grab the secret via a tiny Lambda and xfer it via S3 to Glue ... but

Is there any way to store files on Amazon EFS using Lambda Functions?

自闭症网瘾萝莉.ら 提交于 2020-07-10 07:48:25
问题 I'm developing an API using API Gateway + Lambda Functions. The company's website is at EC2 and its images are at EFS. I have to develop one API method to upload some images to EFS, but I can't find a way to do that. Is EFS even accessible from a lambda function? Thanks in advance 回答1: AWS has released Lambda filesystem support. See these details for configuration information, including CloudFormation and SAM templates. The file system and the Lambda function must be in the same region, and

Is there any way to store files on Amazon EFS using Lambda Functions?

百般思念 提交于 2020-07-10 07:48:11
问题 I'm developing an API using API Gateway + Lambda Functions. The company's website is at EC2 and its images are at EFS. I have to develop one API method to upload some images to EFS, but I can't find a way to do that. Is EFS even accessible from a lambda function? Thanks in advance 回答1: AWS has released Lambda filesystem support. See these details for configuration information, including CloudFormation and SAM templates. The file system and the Lambda function must be in the same region, and