AWS Lambda interview questions

148. Is there a performance impact of using the Runtime Logs API?
You can only use the Runtime Logs API from within AWS Lambda Extensions. Extensions may impact the performance of your function because they share resources such as CPU, memory, and storage with the function, and because extensions are initialized before function code. For example, if an extension performs compute intensive operations, you may see your function’s execution duration increase because the extension and your function code share the same CPU resources. Additionally, each subscription to the Runtime Logs API could consume additional memory to store logs, on top of what the extension containing it consumes.

149. How will I be charged for using the Runtime Logs API?
There is no additional charge for using the AWS Lambda Runtime Logs API. Extensions that make use of the Runtime Logs API share the same billing model as other extensions and Lambda functions.

150. Does using the Runtime Logs API disable sending logs to Amazon CloudWatch Logs?
No, by default, the Lambda platform sends all logs to CloudWatch Logs, and using the Runtime Logs API does not disable egress to CloudWatch Logs.

151. What is the easier way to call another AWS Lambda function from a AWS Lambda function ?
It is better to use SNS of this kind of approach.

152. How to pass a query string or route parameter to AWS Lambda from Amazon API Gateway ?
Use “Use Lambda Proxy integration”, under Integration Request, under the resource.
You’ll then be able to access query parameters, path parameters and headers like so

153. What may the common reason for “Unable to import module ‘lambda_function’: No module named lambda_function”
This Error was due to file name of the lambda function. When creating the lambda function you need to mention Lambda function handler. You need to give name as your Python_File_Name.Method_Name. If that is not matching this error can come.

154. When you get a message as Process exited before completing request, what does it mean ?
“Process exited before completing request” means that the Javascript function exited before calling context.done (or context.succeed, etc.). Usually, this means that there is some error in your code.

155. How can you load npm modules in AWS Lambda?
You can load NPM modules by uploading it as a .zip file.
Put your Lambda function file(s) in a separate directory. This is because you install npm packages locally for Lambda and you want to be able to isolate and test what you will upload to Lambda.
Install your NPM packages locally with npm install packageName while you’re in your separate Lambda directory you created in step #1.
Go to the Lambda’s directory and compress the contents, make sure not to include the directory itself.
zip -r .
using AWS CLI – aws lambda update-function-code –function-name lambdaFunc \
–zip-file fileb://~/path/to/your/
alias up=”aws lambda update-function-code –function-name lambdaFunc \

Author: user

Leave a Reply