AWS Lambda interview questions

141. Do I need to change my code if I want to use Provisioned Concurrency?
You don’t need to make any changes to your code to use Provisioned Concurrency. It works seamlessly with all existing functions and runtimes. There is no change to the invocation and execution model of Lambda when using Provisioned Concurrency.

142. How will I be charged for Provisioned Concurrency?
Provisioned Concurrency adds a pricing dimension, of ‘Provisioned Concurrency’, for keeping functions initialized. When enabled, you pay for the amount of concurrency that you configure and for the period of time that you configure it. When your function executes while Provisioned Concurrency is configured on it, you also pay for Requests and execution Duration.

143. How do extensions work while Provisioned Concurrency is enabled?
Provisioned Concurrency keeps functions initialized and ready to respond in double-digit milliseconds. When enabled, Provisioned Concurrency will also initialize extensions and keep them ready to execute alongside function code.

144. What permissions do extensions have?
Because Extensions are executed within the same environment as a Lambda function. They have access to the same resources as the function and permissions are shared between the function and the extension, therefore they share credentials, role, and environment variables. Extensions have read-only access to function code, and can read and write in /tmp.

145. What is the AWS Lambda Runtime Logs API?
The AWS Lambda Runtime Logs API enables you to use extensions to send logs from AWS Lambda functions directly to a destination of your choice. Extensions use this API to subscribe to the same logs that are streamed to Amazon CloudWatch Logs, and can then process, filter, and send them to any preferred destination.

146. How does the Runtime Logs API work?
The Lambda service automatically captures logs and streams them to Amazon CloudWatch. This stream contains the logs which are generated from within your function code, and also those generated by the Lambda service as part of the invoke.The Runtime Logs API allows extension authors to subscribe to the same log streams directly from within the Lambda execution environment. After receiving the subscription request, the Lambda service streams logs to the extension via HTTP or TCP in addition to sending them to CloudWatch.

147. How do I get started with using the Runtime Logs API?
You can deploy extensions that use the Runtime Logs API, using Layers, on one or more Lambda functions using the Console, CLI, or Infrastructure as Code tools such as CloudFormation, the AWS Serverless Application Model, and Terraform. You can use extensions for your favorite tools for monitoring, observability, security, and governance from AWS as well as the following partners: Coralogix, Datadog, Honeycomb, Lumigo, New Relic, Sumo Logic, and Amazon CloudWatch.

Author: user

Leave a Reply