id
stringlengths 14
16
| text
stringlengths 1
2.43k
| source
stringlengths 99
229
|
|---|---|---|
a79b644c7b0d-2
|
~/my-function/package$ cd $OLDPWD
~/my-function$ zip -g function.zip lambda_function.py
adding: lambda_function.py (deflated 56%)
```
1. Use the [fileb://](https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-file.html#cli-usage-parameters-file-binary) prefix to upload the binary ZIP deployment package to Lambda and update the function code\.
```
~/my-function$ aws lambda update-function-code --function-name my-function --zip-file fileb://function.zip
{
"FunctionName": "my-function",
"FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:my-function",
"Runtime": "python3.8",
"Role": "arn:aws:iam::123456789012:role/lambda-role",
"Handler": "lambda_function.lambda_handler",
"CodeSize": 2269409,
"CodeSha256": "GcZ05oeHoJi61VpQj7vCLPs8DwCXmX5sE/fE2IHsizc=",
"Version": "$LATEST",
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
a79b644c7b0d-3
|
"Version": "$LATEST",
"RevisionId": "a9c05ffd-8ad6-4d22-b6cd-d34a00c1702c",
...
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
4002b7008e59-0
|
In some cases, you may need to use a [virtual environment](https://virtualenv.pypa.io/en/latest/) to install dependencies for your function\. This can occur if your function or its dependencies have dependencies on native libraries, or if you used Homebrew to install Python\.
**To update a Python function with a virtual environment**
1. Create a virtual environment\.
```
~/my-function$ virtualenv v-env
Using base prefix '~/.local/python-3.7.0'
New python executable in v-env/bin/python3.8
Also creating executable in v-env/bin/python
Installing setuptools, pip, wheel...
done.
```
**Note**
For Python 3\.3 and newer, you can use the built\-in [venv module](https://docs.python.org/3/library/venv.html) to create a virtual environment, instead of installing `virtualenv`\.
```
~/my-function$ python3 -m venv v-env
```
1. Activate the environment\.
```
~/my-function$ source v-env/bin/activate
(v-env) ~/my-function$
```
1. Install libraries with pip\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
4002b7008e59-1
|
(v-env) ~/my-function$
```
1. Install libraries with pip\.
```
(v-env) ~/my-function$ pip install Pillow
Collecting Pillow
Using cached https://files.pythonhosted.org/packages/62/8c/230204b8e968f6db00c765624f51cfd1ecb6aea57b25ba00b240ee3fb0bd/Pillow-5.3.0-cp37-cp37m-manylinux1_x86_64.whl
Installing collected packages: Pillow
Successfully installed Pillow-5.3.0
```
1. Deactivate the virtual environment\.
```
(v-env) ~/my-function$ deactivate
```
1. Create a ZIP archive with the contents of the library\.
```
~/my-function$ cd v-env/lib/python3.8/site-packages
~/my-function/v-env/lib/python3.8/site-packages$ zip -r9 ${OLDPWD}/function.zip .
adding: easy_install.py (deflated 17%)
adding: PIL/ (stored 0%)
adding: PIL/.libs/ (stored 0%)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
4002b7008e59-2
|
adding: PIL/ (stored 0%)
adding: PIL/.libs/ (stored 0%)
adding: PIL/.libs/libfreetype-7ce95de6.so.6.16.1 (deflated 65%)
adding: PIL/.libs/libjpeg-3fe7dfc0.so.9.3.0 (deflated 72%)
...
```
Depending on the library, dependencies may appear in either `site-packages` or `dist-packages`, and the first folder in the virtual environment may be `lib` or `lib64`\. You can use the `pip show` command to locate a specific package\.
1. Add your function code to the archive\.
```
~/my-function/v-env/lib/python3.8/site-packages$ cd $OLDPWD
~/my-function$ zip -g function.zip lambda_function.py
adding: lambda_function.py (deflated 56%)
```
1. Use the [fileb://](https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-file.html#cli-usage-parameters-file-binary) prefix to upload the binary ZIP deployment package to Lambda and update the function code\.
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
4002b7008e59-3
|
```
~/my-function$ aws lambda update-function-code --function-name my-function --zip-file fileb://function.zip
{
"FunctionName": "my-function",
"FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:my-function",
"Runtime": "python3.8",
"Role": "arn:aws:iam::123456789012:role/lambda-role",
"Handler": "lambda_function.lambda_handler",
"CodeSize": 5912988,
"CodeSha256": "A2P0NUWq1J+LtSbkuP8tm9uNYqs1TAa3M76ptmZCw5g=",
"Version": "$LATEST",
"RevisionId": "5afdc7dc-2fcb-4ca8-8f24-947939ca707f",
...
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
22d49bdadef3-0
|
You can use Amazon S3 batch operations to invoke a Lambda function on a large set of Amazon S3 objects\. Amazon S3 tracks the progress of batch operations, sends notifications, and stores a completion report that shows the status of each action\.
To run a batch operation, you create an Amazon S3 [batch operations job](https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-operations.html)\. When you create the job, you provide a manifest \(the list of objects\) and configure the action to perform on those objects\.
When the batch job starts, Amazon S3 invokes the Lambda function [synchronously](invocation-sync.md) for each object in the manifest\. The event parameter includes the names of the bucket and the object\.
The following example shows the event that Amazon S3 sends to the Lambda function for an object that is named **customerImage1\.jpg** in the **awsexamplebucket** bucket\.
**Example Amazon S3 batch request event**
```
{
"invocationSchemaVersion": "1.0",
"invocationId": "YXNkbGZqYWRmaiBhc2RmdW9hZHNmZGpmaGFzbGtkaGZza2RmaAo",
"job": {
"id": "f3cc4f60-61f6-4a2b-8a21-d07600c373ce"
},
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-s3-batch.md
|
22d49bdadef3-1
|
},
"tasks": [
{
"taskId": "dGFza2lkZ29lc2hlcmUK",
"s3Key": "customerImage1.jpg",
"s3VersionId": "1",
"s3BucketArn": "arn:aws:s3:us-east-1:0123456788:awsexamplebucket"
}
]
}
```
Your Lambda function must return a JSON object with the fields as shown in the following example\. You can copy the `invocationId` and `taskId` from the event parameter\. You can return a string in the `resultString`\. Amazon S3 saves the `resultString` values in the completion report\.
**Example Amazon S3 batch request response**
```
{
"invocationSchemaVersion": "1.0",
"treatMissingKeysAs" : "PermanentFailure",
"invocationId" : "YXNkbGZqYWRmaiBhc2RmdW9hZHNmZGpmaGFzbGtkaGZza2RmaAo",
"results": [
{
"taskId": "dGFza2lkZ29lc2hlcmUK",
"resultCode": "Succeeded",
"resultString": "["Alice", "Bob"]"
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-s3-batch.md
|
22d49bdadef3-2
|
"resultCode": "Succeeded",
"resultString": "["Alice", "Bob"]"
}
]
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-s3-batch.md
|
cb04d8ec701c-0
|
You can invoke the Lambda function with an unqualified or qualified function ARN\. If you want to use the same function version for the entire batch job, configure a specific function version in the `FunctionARN` parameter when you create your job\. If you configure an alias or the $LATEST qualifier, the batch job immediately starts calling the new version of the function if the alias or $LATEST is updated during the job execution\.
Note that you can't reuse an existing Amazon S3 event\-based function for batch operations\. This is because the Amazon S3 batch operation passes a different event parameter to the Lambda function and expects a return message with a specific JSON structure\.
In the [resource\-based policy](access-control-resource-based.md) that you create for the Amazon S3 batch job, ensure that you set permission for the job to invoke your Lambda function\.
In the [execution role](lambda-intro-execution-role.md) for the function, set a trust policy for Amazon S3 to assume the role when it executes your function\.
If your function uses the AWS SDK to manage Amazon S3 resources, you need to add Amazon S3 permissions in the execution role\.
When the job executes, Amazon S3 starts multiple function instances to process the Amazon S3 objects in parallel, up to the [concurrency limit](invocation-scaling.md) of the function\. Amazon S3 limits the initial ramp\-up of instances to avoid excess cost for smaller jobs\.
If the Lambda function returns a `TemporaryFailure` response code, Amazon S3 retries the operation\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-s3-batch.md
|
cb04d8ec701c-1
|
If the Lambda function returns a `TemporaryFailure` response code, Amazon S3 retries the operation\.
For more information about Amazon S3 batch operations, see [Performing batch operations](https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops.html) in the *Amazon S3 Developer Guide*\.
For an example of how to use a Lambda function in Amazon S3 batch operations, see [Invoking a Lambda function from Amazon S3 batch operations](https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-invoke-lambda.html) in the *Amazon S3 Developer Guide*\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-s3-batch.md
|
3a1afe44e1ab-0
|
[Amazon CloudWatch events](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatchEvents.html) help you to respond to state changes in your AWS resources\. When your resources change state, they automatically send events into an event stream\. You can create rules that match selected events in the stream and route them to your AWS Lambda function to take action\. For example, you can automatically invoke an AWS Lambda function to log the state of an [EC2 instance](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/LogEC2InstanceState.html) or [AutoScaling group](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/LogASGroupState.html)\.
CloudWatch Events invokes your function asynchronously with an event document that wraps the event from its source\. The following example shows an event that originated from a database snapshot in Amazon Relational Database Service\.
**Example CloudWatch Events event**
```
{
"version": "0",
"id": "fe8d3c65-xmpl-c5c3-2c87-81584709a377",
"detail-type": "RDS DB Instance Event",
"source": "aws.rds",
"account": "123456789012",
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-cloudwatchevents.md
|
3a1afe44e1ab-1
|
"source": "aws.rds",
"account": "123456789012",
"time": "2020-04-28T07:20:20Z",
"region": "us-east-2",
"resources": [
"arn:aws:rds:us-east-2:123456789012:db:rdz6xmpliljlb1"
],
"detail": {
"EventCategories": [
"backup"
],
"SourceType": "DB_INSTANCE",
"SourceArn": "arn:aws:rds:us-east-2:123456789012:db:rdz6xmpliljlb1",
"Date": "2020-04-28T07:20:20.112Z",
"Message": "Finished DB Instance backup",
"SourceIdentifier": "rdz6xmpliljlb1"
}
}
```
You can also create a Lambda function and direct AWS Lambda to execute it on a regular schedule\. You can specify a fixed rate \(for example, execute a Lambda function every hour or 15 minutes\), or you can specify a Cron expression\.
**Example CloudWatch Events message event**
```
{
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-cloudwatchevents.md
|
3a1afe44e1ab-2
|
**Example CloudWatch Events message event**
```
{
"account": "123456789012",
"region": "us-east-2",
"detail": {},
"detail-type": "Scheduled Event",
"source": "aws.events",
"time": "2019-03-01T01:23:45Z",
"id": "cdc73f9d-aea9-11e3-9d5a-835b769c0d9c",
"resources": [
"arn:aws:events:us-east-1:123456789012:rule/my-schedule"
]
}
```
**To configure CloudWatch Events to invoke your function**
1. Open the Lambda console [Functions page](https://console.aws.amazon.com/lambda/home#/functions)\.
1. Choose a function
1. Under **Designer**, choose **Add trigger**\.
1. Set the trigger type to **CloudWatch Events/EventBridge**\.
1. For **Rule**, choose **Create a new rule**\.
1. Configure the remaining options and choose **Add**\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-cloudwatchevents.md
|
3a1afe44e1ab-3
|
1. Configure the remaining options and choose **Add**\.
For more information on expressions schedules, see [Schedule expressions using rate or cron](services-cloudwatchevents-expressions.md)\.
Each AWS account can have up to 100 unique event sources of the **CloudWatch Events\- Schedule** source type\. Each of these can be the event source for up to five Lambda functions\. That is, you can have up to 500 Lambda functions that can be executing on a schedule in your AWS account\.
**Topics**
+ [Tutorial: Using AWS Lambda with scheduled events](services-cloudwatchevents-tutorial.md)
+ [AWS SAM template for a CloudWatch Events application](with-scheduledevents-example-use-app-spec.md)
+ [Schedule expressions using rate or cron](services-cloudwatchevents-expressions.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-cloudwatchevents.md
|
66490eedbfba-0
|
The following table describes the important changes to the *AWS Lambda Developer Guide* since May 2018\. For notification about updates to this documentation, subscribe to the [RSS feed](https://docs.aws.amazon.com/lambda/latest/dg/lambda-updates.rss)\.
| Change | Description | Date |
| --- |--- |--- |
| [Support for Java 8 and custom runtimes on AL2](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html?icmpid=docs_lambda_rss) | Lambda now supports Java 8 and custom runtimes on Amazon Linux 2\. For details, see [AWS Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html?icmpid=docs_lambda_rss)\. | August 12, 2020 |
| [New event source to provide Amazon Managed Streaming for Apache Kafka](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html?icmpid=docs_lambda_rss) | Lambda now supports Amazon MSK as an event source\. Use a Lambda function with Amazon MSK to process records in a Kafka topic\. For details, see [Using Lambda with Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html?icmpid=docs_lambda_rss)\. | August 11, 2020 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-1
|
| [IAM condition keys for Amazon VPC settings](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html?icmpid=docs_lambda_rss) | You can now use Lambda\-specific condition keys for VPC settings\. For example, you can require that all functions in your organization are connected to a VPC\. You can also specify the subnets and security groups that the function's users can and can't use\. For details, see [Configuring VPC for IAM functions](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html?icmpid=docs_lambda_rss)\. | August 10, 2020 |
| [Concurrency settings for Kinesis HTTP/2 stream consumers](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss) | You can now use the following concurrency settings for Kinesis consumers with enhanced fan\-out \(HTTP/2 streams\): ParallelizationFactor, MaximumRetryAttempts, MaximumRecordAgeInSeconds, DestinationConfig, and BisectBatchOnFunctionError\. For details, see [Using AWS Lambda with Amazon Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss)\. | July 7, 2020 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-2
|
| [Batch window for Kinesis HTTP/2 stream consumers](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss) | You can now configure a batch window \(MaximumBatchingWindowInSeconds\) for HTTP/2 streams\. Lambda reads records from the stream until it has gathered a full batch, or until the batch window expires\. For details, see [Using AWS Lambda with Amazon Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss)\. | June 18, 2020 |
| [Support for Amazon EFS file systems](https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html?icmpid=docs_lambda_rss) | You can now connect an Amazon EFS file system to your Lambda functions for shared network file access\. For details, see [Configuring file system access for Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html?icmpid=docs_lambda_rss)\. | June 16, 2020 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-3
|
| [AWS CDK sample applications in the Lambda console](https://docs.aws.amazon.com/lambda/latest/dg/applications-tutorial.html?icmpid=docs_lambda_rss) | The Lambda console now includes sample applications that use the AWS Cloud Development Kit \(AWS CDK\) for TypeScript\. The AWS CDK is a framework that enables you to define your application resources in TypeScript, Python, Java, or \.NET\. For a tutorial on creating applications, see [Creating an application with continuous delivery in the Lambda console](https://docs.aws.amazon.com/lambda/latest/dg/applications-tutorial.html?icmpid=docs_lambda_rss)\. | June 1, 2020 |
| [Support for \.NET Core 3\.1\.0 runtime in AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/csharp-package-cli.html?icmpid=docs_lambda_rss) | AWS Lambda now supports the \.NET Core 3\.1\.0 runtime\. For details, see [\.NET Core CLI](https://docs.aws.amazon.com/lambda/latest/dg/csharp-package-cli.html?icmpid=docs_lambda_rss)\. | March 31, 2020 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-4
|
| [Support for API Gateway HTTP APIs](https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html?icmpid=docs_lambda_rss) | Updated and expanded documentation for using Lambda with API Gateway, including support for HTTP APIs\. Added a sample application that creates an API and function with AWS CloudFormation\. For details, see [Using AWS Lambda with Amazon API Gateway](https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html?icmpid=docs_lambda_rss)\. | March 23, 2020 |
| [Ruby 2\.7](https://docs.aws.amazon.com/lambda/latest/dg/lambda-ruby.html?icmpid=docs_lambda_rss) | A new runtime is available for Ruby 2\.7, ruby2\.7, which is the first Ruby runtime to use Amazon Linux 2\. For details, see [Building Lambda functions with Ruby](https://docs.aws.amazon.com/lambda/latest/dg/lambda-ruby.html?icmpid=docs_lambda_rss)\. | February 19, 2020 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-5
|
| [Concurrency metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html?icmpid=docs_lambda_rss) | AWS Lambda now reports the `ConcurrentExecutions` metric for all functions, aliases, and versions\. You can view a graph for this metric on the monitoring page for your function\. Previously, `ConcurrentExecutions` was only reported at the account level and for functions that use reserved concurrency\. For details, see [AWS Lambda function metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html?icmpid=docs_lambda_rss)\. | February 18, 2020 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-6
|
| [Update to function states](https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html?icmpid=docs_lambda_rss) | Function states are now enforced for all functions by default\. When you connect a function to a VPC, Lambda creates shared elastic network interfaces\. This enables your function to scale up without creating additional network interfaces\. During this time, you can't perform additional operations on the function, including updating its configuration and publishing versions\. In some cases, invocation is also impacted\. Details about a function's current state are available from the Lambda API\.This update is being released in phases\. For details, see [Updated Lambda states lifecycle for VPC networking](https://aws.amazon.com/blogs/compute/coming-soon-updated-lambda-states-lifecycle-for-vpc-networking/) on the AWS Compute Blog\. For more information about states, see [AWS Lambda function states](https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html?icmpid=docs_lambda_rss)\. | January 24, 2020 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-7
|
| [Updates to function configuration API output](https://docs.aws.amazon.com/lambda/latest/dg/API_FunctionConfiguration.html?icmpid=docs_lambda_rss) | Added reason codes to [StateReasonCode](https://docs.aws.amazon.com/lambda/latest/dg/API_GetFunctionConfiguration.html?icmpid=docs_lambda_rss#SSS-GetFunctionConfiguration-response-LastUpdateStatusReasonCode) \(InvalidSubnet, InvalidSecurityGroup\) and LastUpdateStatusReasonCode \(SubnetOutOfIPAddresses, InvalidSubnet, InvalidSecurityGroup\) for functions that connect to a VPC\. For more information about states, see [AWS Lambda function states](https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html?icmpid=docs_lambda_rss)\. | January 20, 2020 |
| [Provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html?icmpid=docs_lambda_rss) | You can now allocate provisioned concurrency for a function version or alias\. Provisioned concurrency enables a function to scale without fluctuations in latency\. For details, see [Managing concurrency for a Lambda function](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html?icmpid=docs_lambda_rss)\. | December 3, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-8
|
| [Create a database proxy](https://docs.aws.amazon.com/lambda/latest/dg/configuration-database.html?icmpid=docs_lambda_rss) | You can now use the Lambda console to create a database proxy for a Lambda function\. A database proxy enables a function to reach high concurrency levels without exhausting database connections\. For details, see [Configuring database access for a Lambda function](https://docs.aws.amazon.com/lambda/latest/dg/configuration-database.html?icmpid=docs_lambda_rss)\. | December 3, 2019 |
| [Percentiles support for the duration metric](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html?icmpid=docs_lambda_rss) | You can now filter the duration metric based on percentiles\. For details, see [AWS Lambda metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html?icmpid=docs_lambda_rss)\. | November 26, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-9
|
| [Increased concurrency for stream event sources](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html?icmpid=docs_lambda_rss) | A new option for [DynamoDB stream](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html?icmpid=docs_lambda_rss) and [Kinesis stream](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss) event source mappings enables you to process more than one batch at a time from each shard\. When you increase the number of concurrent batches per shard, your function's concurrency can be up to 10 times the number of shards in your stream\. For details, see [AWS Lambda event source mapping](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html?icmpid=docs_lambda_rss)\. | November 25, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-10
|
| [Function states](https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html?icmpid=docs_lambda_rss) | When you create or update a function, it enters a pending state while Lambda provisions resources to support it\. If you connect your function to a VPC, Lambda can create a shared elastic network interface right away, instead of creating network interfaces when your function is invoked\. This results in better performance for VPC\-connected functions, but might require an update to your automation\. For details, see [AWS Lambda function states](https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html?icmpid=docs_lambda_rss)\. | November 25, 2019 |
| [Error handling options for asynchronous invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html?icmpid=docs_lambda_rss#invocation-async-errors) | New configuration options are available for asynchronous invocation\. You can configure Lambda to limit retries and set a maximum event age\. For details, see [Configuring error handling for asynchronous invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html?icmpid=docs_lambda_rss#invocation-async-errors)\. | November 25, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-11
|
| [Error handling for stream event sources](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html?icmpid=docs_lambda_rss) | New configuration options are available for event source mappings that read from streams\. You can configure [DynamoDB stream](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html?icmpid=docs_lambda_rss) and [Kinesis stream](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss) event source mappings to limit retries and set a maximum record age\. When errors occur, you can configure the event source mapping to split batches before retrying, and to send invocation records for failed batches to a queue or topic\. For details, see [AWS Lambda event source mapping](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html?icmpid=docs_lambda_rss)\. | November 25, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-12
|
| [Destinations for asynchronous invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html?icmpid=docs_lambda_rss#invocation-async-destinations) | You can now configure Lambda to send records of asynchronous invocations to another service\. Invocation records contain details about the event, context, and function response\. You can send invocation records to an SQS queue, SNS topic, Lambda function, or EventBridge event bus\. For details, see [Configuring destinations for asynchronous invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html?icmpid=docs_lambda_rss#invocation-async-destinations)\. | November 25, 2019 |
| [New runtimes for Node\.js, Python, and Java](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html?icmpid=docs_lambda_rss) | New runtimes are available for Node\.js 12, Python 3\.8, and Java 11\. For details, see [AWS Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html?icmpid=docs_lambda_rss)\. | November 18, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-13
|
| [FIFO queue support for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html?icmpid=docs_lambda_rss) | You can now create an event source mapping that reads from a first\-in, first\-out \(FIFO\) queue\. Previously, only standard queues were supported\. For details, see [Using AWS Lambda with Amazon SQS](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html?icmpid=docs_lambda_rss)\. | November 18, 2019 |
| [Create applications in the Lambda console](https://docs.aws.amazon.com/lambda/latest/dg/applications-tutorial.html?icmpid=docs_lambda_rss) | Application creation in the Lambda console is now generally available\. For instructions, see [Creating an application with continuous delivery in the Lambda console](https://docs.aws.amazon.com/lambda/latest/dg/applications-tutorial.html?icmpid=docs_lambda_rss)\. | October 31, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-14
|
| [Create applications in the Lambda console \(beta\)](https://docs.aws.amazon.com/lambda/latest/dg/applications-tutorial.html?icmpid=docs_lambda_rss) | You can now create a Lambda application with an integrated continuous delivery pipeline in the Lambda console\. The console provides sample applications that you can use as a starting point for your own project\. Choose between AWS CodeCommit and GitHub for source control\. Each time you push changes to your repository, the included pipeline builds and deploys them automatically\. For instructions, see [Creating an application with continuous delivery in the Lambda console](https://docs.aws.amazon.com/lambda/latest/dg/applications-tutorial.html?icmpid=docs_lambda_rss)\. | October 3, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-15
|
| [Performance improvements for VPC\-connected functions](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html?icmpid=docs_lambda_rss) | Lambda now uses a new type of elastic network interface that is shared by all functions in a virtual private cloud \(VPC\) subnet\. When you connect a function to a VPC, Lambda creates a network interface for each combination of security group and subnet that you choose\. When the shared network interfaces are available, the function no longer needs to create additional network interfaces as it scales up\. This dramatically improves startup times\. For details, see [Configuring a Lambda function to access resources in a VPC](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html?icmpid=docs_lambda_rss)\. | September 3, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-16
|
| [Stream batch settings](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html?icmpid=docs_lambda_rss) | You can now configure a batch window for [Amazon DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html?icmpid=docs_lambda_rss) and [Amazon Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss) event source mappings\. Configure a batch window of up to five minutes to buffer incoming records until a full batch is available\. This reduces the number of times that your function is invoked when the stream is less active\. | August 29, 2019 |
| [CloudWatch Logs Insights integration](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions-access-metrics.html?icmpid=docs_lambda_rss) | The monitoring page in the Lambda console now includes reports from Amazon CloudWatch Logs Insights\. For details, see [Monitoring functions in the AWS Lambda console](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions-access-metrics.html?icmpid=docs_lambda_rss)\. | June 18, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-17
|
| [Amazon Linux 2018\.03](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html?icmpid=docs_lambda_rss) | The Lambda execution environment is being updated to use Amazon Linux 2018\.03\. For details, see [Execution environment](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html?icmpid=docs_lambda_rss)\. | May 21, 2019 |
| [Node\.js 10](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html?icmpid=docs_lambda_rss) | A new runtime is available for Node\.js 10, nodejs10\.x\. This runtime uses Node\.js 10\.15 and will be updated with the latest point release of Node\.js 10 periodically\. Node\.js 10 is also the first runtime to use Amazon Linux 2\. For details, see [Building Lambda functions with Node\.js](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html?icmpid=docs_lambda_rss)\. | May 13, 2019 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-18
|
| [GetLayerVersionByArn API](https://docs.aws.amazon.com/lambda/latest/dg/API_GetLayerVersionByArn.html?icmpid=docs_lambda_rss) | Use the [GetLayerVersionByArn](https://docs.aws.amazon.com/lambda/latest/dg/API_GetLayerVersionByArn.html?icmpid=docs_lambda_rss) API to download layer version information with the version ARN as input\. Compared to GetLayerVersion, GetLayerVersionByArn lets you use the ARN directly instead of parsing it to get the layer name and version number\. | April 25, 2019 |
| [Ruby](https://docs.aws.amazon.com/lambda/latest/dg/lambda-ruby.html?icmpid=docs_lambda_rss) | AWS Lambda now supports Ruby 2\.5 with a new runtime\. For details, see [Building Lambda functions with Ruby](https://docs.aws.amazon.com/lambda/latest/dg/lambda-ruby.html?icmpid=docs_lambda_rss)\. | November 29, 2018 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-19
|
| [Layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html?icmpid=docs_lambda_rss) | With Lambda layers, you can package and deploy libraries, custom runtimes, and other dependencies separately from your function code\. Share your layers with your other accounts or the whole world\. For details, see [AWS Lambda layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html?icmpid=docs_lambda_rss)\. | November 29, 2018 |
| [Custom runtimes](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html?icmpid=docs_lambda_rss) | Build a custom runtime to run Lambda functions in your favorite programming language\. For details, see [Custom AWS Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html?icmpid=docs_lambda_rss)\. | November 29, 2018 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-20
|
| [Application Load Balancer triggers](https://docs.aws.amazon.com/lambda/latest/dg/services-alb.html?icmpid=docs_lambda_rss) | Elastic Load Balancing now supports Lambda functions as a target for Application Load Balancers\. For details, see [Using Lambda with application load balancers](https://docs.aws.amazon.com/lambda/latest/dg/services-alb.html?icmpid=docs_lambda_rss)\. | November 29, 2018 |
| [Use Kinesis HTTP/2 stream consumers as a trigger](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss) | You can use Kinesis HTTP/2 data stream consumers to send events to AWS Lambda\. Stream consumers have dedicated read throughput from each shard in your data stream and use HTTP/2 to minimize latency\. For details, see [Using AWS Lambda with Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html?icmpid=docs_lambda_rss)\. | November 19, 2018 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-21
|
| [Python 3\.7](https://docs.aws.amazon.com/lambda/latest/dg/lambda-python.html?icmpid=docs_lambda_rss) | AWS Lambda now supports Python 3\.7 with a new runtime\. For more information, see [Building Lambda functions with Python](https://docs.aws.amazon.com/lambda/latest/dg/lambda-python.html?icmpid=docs_lambda_rss)\. | November 19, 2018 |
| [Payload limit increase for asynchronous function invocation](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html?icmpid=docs_lambda_rss) | The maximum payload size for asynchronous invocations increased from 128 KB to 256 KB, which matches the maximum message size from an Amazon SNS trigger\. For details, see [AWS Lambda quotas](https://docs.aws.amazon.com/lambda/latest/dg/limits.html?icmpid=docs_lambda_rss)\. | November 16, 2018 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-22
|
| [AWS GovCloud \(US\-East\) Region](https://docs.aws.amazon.com/lambda/latest/dg/lambda-releases.html?icmpid=docs_lambda_rss) | AWS Lambda is now available in the AWS GovCloud \(US\-East\) Region\. For details, see [AWS GovCloud \(US\-East\) now open](https://aws.amazon.com/blogs/aws/aws-govcloud-us-east-now-open/?icmpid=docs_lambda_rss) on the AWS blog\. | November 12, 2018 |
| [Moved AWS SAM topics to a separate Developer Guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/?icmpid=docs_lambda_rss) | A number of topics were focused on building serverless applications using the AWS Serverless Application Model \(AWS SAM\)\. These topics have been moved to [ AWS Serverless Application Model developer guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/)\. | October 25, 2018 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-23
|
| [View Lambda applications in the console](https://docs.aws.amazon.com/lambda/latest/dg/applications-console.html?icmpid=docs_lambda_rss) | You can view the status of your Lambda applications on the [Applications](https://docs.aws.amazon.com/lambda/latest/dg/applications-console.html?icmpid=docs_lambda_rss) page in the Lambda console\. This page shows the status of the AWS CloudFormation stack\. It includes links to pages where you can view more information about the resources in the stack\. You can also view aggregate metrics for the application and create custom monitoring dashboards\. | October 11, 2018 |
| [Function execution timeout limit](https://docs.aws.amazon.com/lambda/latest/dg/limits.html?icmpid=docs_lambda_rss) | To allow for long\-running functions, the maximum configurable execution timeout increased from 5 minutes to 15 minutes\. For details, see [AWS Lambda limits](https://docs.aws.amazon.com/lambda/latest/dg/limits.html?icmpid=docs_lambda_rss)\. | October 10, 2018 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-24
|
| [Support for PowerShell Core language in AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/powershell-programming-model.html?icmpid=docs_lambda_rss) | AWS Lambda now supports the PowerShell Core language\. For more information, see [Programming model for authoring Lambda functions in PowerShell](https://docs.aws.amazon.com/lambda/latest/dg/powershell-programming-model.html?icmpid=docs_lambda_rss)\. | September 11, 2018 |
| [Support for \.NET Core 2\.1\.0 runtime in AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/lambda-dotnet-coreclr-deployment-package.html?icmpid=docs_lambda_rss) | AWS Lambda now supports the \.NET Core 2\.1\.0 runtime\. For more information, see [\.NET Core CLI](https://docs.aws.amazon.com/lambda/latest/dg/lambda-dotnet-coreclr-deployment-package.html?icmpid=docs_lambda_rss)\. | July 9, 2018 |
| [Updates now available over RSS](https://docs.aws.amazon.com/lambda/latest/dg/history.html?icmpid=docs_lambda_rss) | You can now subscribe to an RSS feed to follow releases for this guide\. | July 5, 2018 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
66490eedbfba-25
|
| [Support for Amazon SQS as event source](https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html?icmpid=docs_lambda_rss) | AWS Lambda now supports Amazon Simple Queue Service \(Amazon SQS\) as an event source\. For more information, see [Invoking Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html?icmpid=docs_lambda_rss)\. | June 28, 2018 |
| [China \(Ningxia\) Region](https://docs.aws.amazon.com/lambda/latest/dg/history.html?icmpid=docs_lambda_rss) | AWS Lambda is now available in the China \(Ningxia\) Region\. For more information about Lambda Regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html?icmpid=docs_lambda_rss) in the *AWS General Reference*\. | June 28, 2018 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-0
|
The following table describes the important changes in each release of the *AWS Lambda Developer Guide* before June 2018\.
| Change | Description | Date |
| --- | --- | --- |
| Runtime support for Node\.js runtime 8\.10 | AWS Lambda now supports Node\.js runtime version 8\.10\. For more information, see [Building Lambda functions with Node\.js](lambda-nodejs.md)\. | April 2, 2018 |
| Function and alias revision IDs | AWS Lambda now supports revision IDs on your function versions and aliases\. You can use these IDs to track and apply conditional updates when you are updating your function version or alias resources\. | January 25, 2018 |
| Runtime support for Go and \.NET 2\.0 | AWS Lambda has added runtime support for Go and \.NET 2\.0\. For more information, see [Building Lambda functions with Go](lambda-golang.md) and [Building Lambda functions with C\#](lambda-csharp.md)\. | January 15, 2018 |
| Console Redesign | AWS Lambda has introduced a new Lambda console to simplify your experience and added a Cloud9 Code Editor to enhance your ability debug and revise your function code\. For more information, see [Creating functions using the AWS Lambda console editor](code-editor.md)\. | November 30,2017 |
| Setting Concurrency Limits on Individual Functions | AWS Lambda now supports setting concurrency limits on individual functions\. For more information, see [Managing concurrency for a Lambda function](configuration-concurrency.md)\. | November 30,2017 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-1
|
| Shifting Traffic with Aliases | AWS Lambda now supports shifting traffic with aliases\. For more information, see [Rolling deployments for Lambda functions ](lambda-rolling-deployments.md)\. | November 28, 2017 |
| Gradual Code Deployment | AWS Lambda now supports safely deploying new versions of your Lambda function by leveraging Code Deploy\. For more information, see [ Gradual code deployment](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/automating-updates-to-serverless-apps.html)\. | November 28, 2017 |
| China \(Beijing\) Region | AWS Lambda is now available in the China \(Beijing\) Region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | November 9, 2017 |
| Introducing SAM Local | AWS Lambda introduces SAM Local \(now known as SAM CLI\), a AWS CLI tool that provides an environment for you to develop, test, and analyze your serverless applications locally before uploading them to the Lambda runtime\. For more information, see [ Testing and debugging serverless applications](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-test-and-debug.html)\. | August 11, 2017 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-2
|
| Canada \(Central\) Region | AWS Lambda is now available in the Canada \(Central\) Region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | June 22, 2017 |
| South America \(São Paulo\) Region | AWS Lambda is now available in the South America \(São Paulo\) Region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | June 6, 2017 |
| AWS Lambda support for AWS X\-Ray\. | Lambda introduces support for X\-Ray, which allows you to detect, analyze, and optimize performance issues with your Lambda applications\. For more information, see [Using AWS Lambda with AWS X\-Ray](services-xray.md)\. | April 19, 2017 |
| Asia Pacific \(Mumbai\) Region | AWS Lambda is now available in the Asia Pacific \(Mumbai\) Region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | March 28, 2017 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-3
|
| AWS Lambda now supports Node\.js runtime v6\.10 | AWS Lambda added support for Node\.js runtime v6\.10\. For more information, see [Building Lambda functions with Node\.js](lambda-nodejs.md)\. | March 22, 2017 |
| Europe \(London\) Region | AWS Lambda is now available in the Europe \(London\) Region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | February 1, 2017 |
| AWS Lambda support for the \.NET runtime, Lambda@Edge \(Preview\), Dead Letter Queues and automated deployment of serverless applications\. | AWS Lambda added support for C\#\. For more information, see [Building Lambda functions with C\#](lambda-csharp.md)\. Lambda@Edge allows you to run Lambda functions at the AWS Edge locations in response to CloudFront events\. For more information, see [Using AWS Lambda with CloudFront Lambda@Edge](lambda-edge.md)\. | December 3, 2016 |
| AWS Lambda adds Amazon Lex as a supported event source\. | Using Lambda and Amazon Lex, you can quickly build chat bots for various services like Slack and Facebook\. For more information, see [Using AWS Lambda with Amazon Lex](services-lex.md)\. | November 30, 2016 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-4
|
| US West \(N\. California\) Region | AWS Lambda is now available in the US West \(N\. California\) Region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | November 21, 2016 |
| Introduced the AWS Serverless Application Model for creating and deploying Lambda\-based applications and using environment variables for Lambda function configuration settings\. | AWS Serverless Application Model: You can now use the AWS SAM to define the syntax for expressing resources within a serverless application\. In order to deploy your application, simply specify the resources you need as part of your application, along with their associated permissions policies in a AWS CloudFormation template file \(written in either JSON or YAML\), package your deployment artifacts, and deploy the template\. For more information, see [AWS Lambda applications](deploying-lambda-apps.md)\. Environment variables: You can use environment variables to specify configuration settings for your Lambda function outside of your function code\. For more information, see [Using AWS Lambda environment variables](configuration-envvars.md)\. | November 18, 2016 |
| Asia Pacific \(Seoul\) Region | AWS Lambda is now available in the Asia Pacific \(Seoul\) Region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | August 29, 2016 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-5
|
| Asia Pacific \(Sydney\) Region | Lambda is now available in the Asia Pacific \(Sydney\) Region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | June 23, 2016 |
| Updates to the Lambda console | The Lambda console has been updated to simplify the role\-creation process\. For more information, see [Create a Lambda function with the console](getting-started-create-function.md)\. | June 23, 2016 |
| AWS Lambda now supports Node\.js runtime v4\.3 | AWS Lambda added support for Node\.js runtime v4\.3\. For more information, see [Building Lambda functions with Node\.js](lambda-nodejs.md)\. | April 07, 2016 |
| Europe \(Frankfurt\) region | Lambda is now available in the Europe \(Frankfurt\) region\. For more information about Lambda regions and endpoints, see [Regions and endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region) in the *AWS General Reference*\. | March 14, 2016 |
| VPC support | You can now configure a Lambda function to access resources in your VPC\. For more information, see [Configuring a Lambda function to access resources in a VPC](configuration-vpc.md)\. | February 11, 2016 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-6
|
| AWS Lambda runtime has been updated\. | The [execution environment](lambda-runtimes.md) has been updated\. | November 4, 2015 |
| Versioning support, Python for developing code for Lambda functions, scheduled events, and increase in execution time | You can now develop your Lambda function code using Python\. For more information, see [Building Lambda functions with Python](lambda-python.md)\. Versioning: You can maintain one or more versions of your Lambda function\. Versioning allows you to control which Lambda function version is executed in different environments \(for example, development, testing, or production\)\. For more information, see [Lambda function versions](configuration-versions.md)\. Scheduled events: You can also set up AWS Lambda to invoke your code on a regular, scheduled basis using the AWS Lambda console\. You can specify a fixed rate \(number of hours, days, or weeks\) or you can specify a cron expression\. For an example, see [Using AWS Lambda with Amazon CloudWatch Events](services-cloudwatchevents.md)\. Increase in execution time: You can now set up your Lambda functions to run for up to five minutes allowing longer running functions such as large volume data ingestion and processing jobs\. | October 08, 2015 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-7
|
| Support for DynamoDB Streams | DynamoDB Streams is now generally available and you can use it in all the regions where DynamoDB is available\. You can enable DynamoDB Streams for your table and use a Lambda function as a trigger for the table\. Triggers are custom actions you take in response to updates made to the DynamoDB table\. For an example walkthrough, see [Tutorial: Using AWS Lambda with Amazon DynamoDB streams](with-ddb-example.md) \. | July 14, 2015 |
| AWS Lambda now supports invoking Lambda functions with REST\-compatible clients\. | Until now, to invoke your Lambda function from your web, mobile, or IoT application you needed the AWS SDKs \(for example, AWS SDK for Java, AWS SDK for Android, or AWS SDK for iOS\)\. Now, AWS Lambda supports invoking a Lambda function with REST\-compatible clients through a customized API that you can create using Amazon API Gateway\. You can send requests to your Lambda function endpoint URL\. You can configure security on the endpoint to allow open access, leverage AWS Identity and Access Management \(IAM\) to authorize access, or use API keys to meter access to your Lambda functions by others\. For an example Getting Started exercise, see [Using AWS Lambda with Amazon API Gateway](services-apigateway.md)\. For more information about the Amazon API Gateway, see [https://aws\.amazon\.com/api\-gateway/](https://aws.amazon.com/api-gateway/)\. | July 09, 2015 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-8
|
| The AWS Lambda console now provides blueprints to easily create Lambda functions and test them\. | AWS Lambda console provides a set of *blueprints*\. Each blueprint provides a sample event source configuration and sample code for your Lambda function that you can use to easily create Lambda\-based applications\. All of the AWS Lambda Getting Started exercises now use the blueprints\. For more information, see [Getting started with AWS Lambda](getting-started.md)\. | July 09, 2015 |
| AWS Lambda now supports Java to author your Lambda functions\. | You can now author Lambda code in Java\. For more information, see [Building Lambda functions with Java](lambda-java.md)\. | June 15, 2015 |
| AWS Lambda now supports specifying an Amazon S3 object as the function \.zip when creating or updating a Lambda function\. | You can upload a Lambda function deployment package \(\.zip file\) to an Amazon S3 bucket in the same region where you want to create a Lambda function\. Then, you can specify the bucket name and object key name when you create or update a Lambda function\. | May 28, 2015 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
4b86d8ced2f6-9
|
| AWS Lambda now generally available with added support for mobile backends | AWS Lambda is now generally available for production use\. The release also introduces new features that make it easier to build mobile, tablet, and Internet of Things \(IoT\) backends using AWS Lambda that scale automatically without provisioning or managing infrastructure\. AWS Lambda now supports both real\-time \(synchronous\) and asynchronous events\. Additional features include easier event source configuration and management\. The permission model and the programming model have been simplified by the introduction of resource policies for your Lambda functions\. The documentation has been updated accordingly\. For information, see the following topics: [Getting started with AWS Lambda](getting-started.md) [AWS Lambda](https://aws.amazon.com/lambda/) | April 9, 2015 |
| Preview release | Preview release of the *AWS Lambda Developer Guide*\. | November 13, 2014 |
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-releases.md
|
2c1caa8a6cf7-0
|
Amazon Managed Streaming for Apache Kafka \(Amazon MSK\) is a managed service that enables you to build and run applications that use [Apache Kafka](http://aws.amazon.com/msk/what-is-kafka/) to process streaming data\. Apache Kafka is a distributed streaming platform that is conceptually similar to [Amazon Kinesis](http://aws.amazon.com/kinesis)\. With Amazon MSK, you can collect data from many sources and process them with multiple consumers\.
You can use a Lambda function to process records in a Kafka topic\. Your function is triggered through an [event source mapping](invocation-eventsourcemapping.md), a Lambda resource that reads items from a topic and invokes the function\. Lambda polls across multiple partitions for new records and invokes your target function [synchronously](invocation-sync.md)\.
The Amazon MSK event source mapping supports the following features:
+ Full compatibility with all Kafka versions that Amazon MSK supports\. For more information, see [Supported Apache Kafka versions](https://docs.aws.amazon.com/msk/latest/developerguide/supported-kafka-versions.html) in the *Amazon Managed Streaming for Apache Kafka Developer Guide*\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
2c1caa8a6cf7-1
|
+ Both plaintext and TLS encrypted brokers\. TLS brokers are not supported with a private certificate authority\. For more information, see the **Encryption in Transit** section of [Amazon MSK Encryption](https://docs.aws.amazon.com/msk/latest/developerguide/msk-encryption.html#msk-encryption-in-transit) in the *Amazon Managed Streaming for Apache Kafka Developer Guide*\.
+ Configurable starting positions and batch sizes\. The configurable starting positions supported are `TRIM_HORIZON` and `LATEST`\. They are not timestamp\-based\.
The following Kafka features are not supported:
+ Authentication – SSL and SASL authentication are not supported\.
+ Schema registry – You can host your own schema registry, but the Lambda API doesn't support this functionality\. For more information, see [Schema Management](https://docs.confluent.io/current/schema-registry/index.html) on the Confluent website\.
**Topics**
+ [Lambda consumer group](#services-msk-configure)
+ [Execution role permissions](#events-kinesis-permissions)
+ [Configuring a topic as an event source](#services-msk-eventsourcemapping)
+ [Event source mapping API](#services-msk-api)
+ [Event source mapping errors](#services-msk-errors)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
85999d9892ae-0
|
To interact with Amazon MSK, Lambda creates a consumer group which can read from multiple Kafka topics\. The consumer group is created with the same ID as an event source mapping UUID\. The Lambda created consumer group is also used for checkpointing\. The group's position in each topic partition is committed to Kafka after successful processing\.
Lambda processes records from one or more partitions and then sends the payload to the target function\. When more records are available, Lambda continues processing batches until the function catches up with the topic\. The maximum supported function execution time is 14 minutes\.
**Example Amazon MSK record event**
```
Received event:{
"eventSource": "aws:kafka",
"eventSourceArn": "arn:aws:kafka:us-west-2:012345678901:cluster/ExampleMSKCluster/e9f754c6-d29a-4430-a7db-958a19fd2c54-4",
"records": {
"AWSKafkaTopic-0": [
{
"topic": "AWSKafkaTopic",
"partition": 0,
"offset": 0,
"timestamp": 1595035749700,
"timestampType": "CREATE_TIME",
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
85999d9892ae-1
|
"timestamp": 1595035749700,
"timestampType": "CREATE_TIME",
"key": "OGQ1NTk2YjQtMTgxMy00MjM4LWIyNGItNmRhZDhlM2QxYzBj",
"value": "OGQ1NTk2YjQtMTgxMy00MjM4LWIyNGItNmRhZDhlM2QxYzBj"
}
]
}
}
```
**Note**
The key\-value set of an `aws:kafka` resource is base64\-encoded\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
bcd3ab0ef0e7-0
|
Your Lambda function's [execution role](lambda-intro-execution-role.md) needs the following permissions to read records from an Amazon MSK cluster:
+ [kafka:DescribeCluster](https://docs.aws.amazon.com/msk/1.0/apireference/clusters-clusterarn.html#clusters-clusterarnget)
+ [kafka:GetBootstrapBrokers](https://docs.aws.amazon.com/msk/1.0/apireference/clusters-clusterarn-bootstrap-brokers.html#clusters-clusterarn-bootstrap-brokersget)
+ [ec2:CreateNetworkInterface](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html)
+ [ec2:DeleteNetworkInterface](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteNetworkInterface.html)
+ [ec2:DescribeNetworkInterfaces](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeNetworkInterfaces.html)
+ [ec2:DescribeSecurityGroups](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
bcd3ab0ef0e7-1
|
+ [ec2:DescribeSubnets](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html)
+ [ec2:DescribeVpcs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html)
+ [logs:CreateLogGroup](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogGroup.html)
+ [logs:CreateLogStream](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogStream.html)
+ [logs:PutLogEvents](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html)
The AWS managed policy `AWSLambdaMSKExecutionRole` includes these permissions\. For more information, see [Managed policies for Lambda features](lambda-intro-execution-role.md#permissions-executionrole-features)\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
8e83167b1b0d-0
|
Create an [event source mapping](invocation-eventsourcemapping.md) to tell Lambda to send records from a Kafka topic to a Lambda function\. You can create multiple event source mappings to process the same data with multiple functions, or to process items from multiple topics with a single function\.
To configure your function to read from Amazon MSK, create an **MSK** trigger in the Lambda console\.
**To create a trigger**
1. Open the Lambda console [Functions page](https://console.aws.amazon.com/lambda/home#/functions)\.
1. Choose a function\.
1. Under **Designer**, choose **Add trigger**\.
1. Choose a trigger type\.
1. Configure the required options and then choose **Add**\.
Lambda supports the following options for Amazon MSK event sources:
+ **MSK cluster** – Select the MSK cluster\.
+ **Topic name** – Enter the Kafka topic to consume\.
+ **Starting position** \(optional\) – Enter the position in the stream to begin reading records\.
+ **Latest** – Read from the latest position in all the topic's partitions\.
+ **Trim Horizon** – Read from the oldest position in all the topic partitions\.
After processing any existing records, the function is caught up and continues to process new records\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
8e83167b1b0d-1
|
After processing any existing records, the function is caught up and continues to process new records\.
+ **Enable trigger** – Disable the trigger to stop processing records\.
To enable or disable the trigger \(or delete it\), choose the **MSK** trigger in the [designer](getting-started-create-function.md#get-started-designer)\. To reconfigure the trigger, use the event source mapping API commands\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
8b82716b8c97-0
|
To manage event source mappings with the AWS CLI or AWS SDK, use the following API actions:
+ [CreateEventSourceMapping](API_CreateEventSourceMapping.md)
+ [ListEventSourceMappings](API_ListEventSourceMappings.md)
+ [GetEventSourceMapping](API_GetEventSourceMapping.md)
+ [UpdateEventSourceMapping](API_UpdateEventSourceMapping.md)
+ [DeleteEventSourceMapping](API_DeleteEventSourceMapping.md)
To create the event source mapping with the AWS Command Line Interface \(AWS CLI\), use the [https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/create-event-source-mapping.html](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/create-event-source-mapping.html) command\. Fetching records from Amazon MSK brokers requires access to an Amazon Virtual Private Cloud \(Amazon VPC\) associated with your MSK cluster\. To meet the Amazon VPC access requirements, you can configure one NAT gateway per public subnet\. For more information, see [Internet and service access for VPC\-connected functions](configuration-vpc.md#vpc-internet)\.
The Amazon VPC security group rules you configure should have the following settings at minimum:
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
8b82716b8c97-1
|
The Amazon VPC security group rules you configure should have the following settings at minimum:
+ Inbound rules – Allow all traffic on all ports for the security group specified as your source\.
+ Outbound rules – Allow all traffic on all ports for all destinations\.
The Amazon VPC configuration is discoverable through the [Amazon MSK API](https://docs.aws.amazon.com/msk/1.0/apireference/resources.html) and doesn't need to be configured in the `create-event-source-mapping` setup\.
The following AWS CLI example maps a Lambda function named `my-kafka-function` to a Kafka topic named `AWSKafkaTopic`, with the starting position set to `latest`:
```
$ aws lambda create-event-source-mapping --event-source-arn arn:aws:kafka:us-west-2:111111111111:cluster/my-cluster/fc2f5bdf-fd1b-45ad-85dd-15b4a5a6247e-2 --topics AWSKafkaTopic --starting-position LATEST --function-name my-kafka-function
{
"UUID": "6d9bce8e-836b-442c-8070-74e77903c815",
"BatchSize": 100,
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
8b82716b8c97-2
|
"BatchSize": 100,
"EventSourceArn": "arn:aws:kafka:us-west-2:111111111111:cluster/my-cluster/fc2f5bdf-fd1b-45ad-85dd-15b4a5a6247e-2",
"FunctionArn": "arn:aws:lambda:us-west-2:111111111111:function:my-kafka-function",
"LastModified": 1580331394.363,
"State": "Creating",
"StateTransitionReason": "USER_INITIATED",
"LastProcessingResult": "OK",
"Topics": [ "AWSKafkaTopic" ]
}
```
Use the [https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/get-event-source-mapping.html](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/get-event-source-mapping.html) command to view the current status of your resource\.
```
$ aws lambda get-event-source-mapping --uuid 6d9bce8e-836b-442c-8070-74e77903c815
{
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
8b82716b8c97-3
|
{
"UUID": "6d9bce8e-836b-442c-8070-74e77903c815"
"BatchSize": 100,
"EventSourceArn": "arn:aws:kafka:us-west-2:111111111111:cluster/my-cluster/fc2f5bdf-fd1b-45ad-85dd-15b4a5a6247e-2",
"FunctionArn": "arn:aws:lambda:us-west-2:111111111111:function:my-kafka-function",
"LastModified": 1580331394.363,
"State": "Enabled",
"StateTransitionReason": "User action",
"LastProcessingResult": "OK",
"Topics": [ "AWSKafkaTopic" ],
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
0b0c92008801-0
|
When a Lambda function encounters an unrecoverable error, your Kafka topic consumer stops processing records\. Any other consumers may continue processing, provided they don't encounter the same error\. To determine the potential cause of a stopped consumer, check the `StateTransitionReason` field in the return details of your `EventSourceMapping` for one of the following codes:
**`ESM_CONFIG_NOT_VALID`**
The event source mapping configuration is not valid\.
**`EVENT_SOURCE_AUTHN_ERROR`**
Lambda failed to authenticate the event source\.
**`EVENT_SOURCE_AUTHZ_ERROR`**
Lambda does not have the required permissions to access the event source\.
**`FUNCTION_CONFIG_NOT_VALID`**
The function's configuration is not valid\.
Records will also go unprocessed if they are dropped due to their size\. The size limit for Lambda records is 6 MB\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/with-msk.md
|
ec76a35c3ee4-0
|
The VPC security groups and subnets that are attached to a Lambda function\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_VpcConfigResponse.md
|
85e9e59ba2a3-0
|
**SecurityGroupIds** <a name="SSS-Type-VpcConfigResponse-SecurityGroupIds"></a>
A list of VPC security groups IDs\.
Type: Array of strings
Array Members: Maximum number of 5 items\.
Required: No
**SubnetIds** <a name="SSS-Type-VpcConfigResponse-SubnetIds"></a>
A list of VPC subnet IDs\.
Type: Array of strings
Array Members: Maximum number of 16 items\.
Required: No
**VpcId** <a name="SSS-Type-VpcConfigResponse-VpcId"></a>
The ID of the VPC\.
Type: String
Required: No
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_VpcConfigResponse.md
|
13153f91bafa-0
|
For more information about using this API in one of the language\-specific AWS SDKs, see the following:
+ [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/VpcConfigResponse)
+ [AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/VpcConfigResponse)
+ [AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/VpcConfigResponse)
+ [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lambda-2015-03-31/VpcConfigResponse)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_VpcConfigResponse.md
|
0ac52661400e-0
|
In this example you create a simple API using Amazon API Gateway\. An Amazon API Gateway is a collection of resources and methods\. For this tutorial, you create one resource \(`DynamoDBManager`\) and define one method \(`POST`\) on it\. The method is backed by a Lambda function \(`LambdaFunctionOverHttps`\)\. That is, when you call the API through an HTTPS endpoint, Amazon API Gateway invokes the Lambda function\.
The `POST` method on the `DynamoDBManager` resource supports the following DynamoDB operations:
+ Create, update, and delete an item\.
+ Read an item\.
+ Scan an item\.
+ Other operations \(echo, ping\), not related to DynamoDB, that you can use for testing\.
The request payload you send in the `POST` request identifies the DynamoDB operation and provides necessary data\. For example:
+ The following is a sample request payload for a DynamoDB create item operation:
```
{
"operation": "create",
"tableName": "lambda-apigateway",
"payload": {
"Item": {
"id": "1",
"name": "Bob"
}
}
}
```
+ The following is a sample request payload for a DynamoDB read item operation:
```
{
"operation": "read",
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
0ac52661400e-1
|
```
{
"operation": "read",
"tableName": "lambda-apigateway",
"payload": {
"Key": {
"id": "1"
}
}
}
```
+ The following is a sample request payload for an `echo` operation\. You send an HTTP POST request to the endpoint, using the following data in the request body\.
```
{
"operation": "echo",
"payload": {
"somekey1": "somevalue1",
"somekey2": "somevalue2"
}
}
```
**Note**
API Gateway offers advanced capabilities, such as:
**Pass through the entire request** – A Lambda function can receive the entire HTTP request \(instead of just the request body\) and set the HTTP response \(instead of just the response body\) using the `AWS_PROXY` integration type\.
**Catch\-all methods** – Map all methods of an API resource to a single Lambda function with a single mapping, using the `ANY` catch\-all method\.
**Catch\-all resources** – Map all sub\-paths of a resource to a Lambda function without any additional configuration using the new path parameter \(`{proxy+})`\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
0ac52661400e-2
|
To learn more about these API Gateway features, see [Configure proxy integration for a proxy resource](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html)\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
99f247b42b80-0
|
This tutorial assumes that you have some knowledge of basic Lambda operations and the Lambda console\. If you haven't already, follow the instructions in [Getting started with AWS Lambda](getting-started.md) to create your first Lambda function\.
To follow the procedures in this guide, you will need a command line terminal or shell to run commands\. Commands are shown in listings preceded by a prompt symbol \($\) and the name of the current directory, when appropriate:
```
~/lambda-project$ this is a command
this is output
```
For long commands, an escape character \(`\`\) is used to split a command over multiple lines\.
On Linux and macOS, use your preferred shell and package manager\. On Windows 10, you can [install the Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to get a Windows\-integrated version of Ubuntu and Bash\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
3b186441ce20-0
|
Create the [execution role](lambda-intro-execution-role.md) that gives your function permission to access AWS resources\.
**To create an execution role**
1. Open the [roles page](https://console.aws.amazon.com/iam/home#/roles) in the IAM console\.
1. Choose **Create role**\.
1. Create a role with the following properties\.
+ **Trusted entity** – Lambda\.
+ **Role name** – **lambda\-apigateway\-role**\.
+ **Permissions** – Custom policy with permission to DynamoDB and CloudWatch Logs\.
```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1428341300017",
"Action": [
"dynamodb:DeleteItem",
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:Query",
"dynamodb:Scan",
"dynamodb:UpdateItem"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "",
"Resource": "*",
"Action": [
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
3b186441ce20-1
|
{
"Sid": "",
"Resource": "*",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Effect": "Allow"
}
]
}
```
The custom policy has the permissions that the function needs to write data to DynamoDB and upload logs\. Note the Amazon Resource Name \(ARN\) of the role for later use\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
77587e3916e2-0
|
The following example code receives a API Gateway event input and processes the messages that it contains\. For illustration, the code writes some of the incoming event data to CloudWatch Logs\.
**Note**
For sample code in other languages, see [Sample function code](services-apigateway-code.md)\.
**Example index\.js**
```
console.log('Loading function');
var AWS = require('aws-sdk');
var dynamo = new AWS.DynamoDB.DocumentClient();
/**
* Provide an event that contains the following keys:
*
* - operation: one of the operations in the switch statement below
* - tableName: required for operations that interact with DynamoDB
* - payload: a parameter to pass to the operation being performed
*/
exports.handler = function(event, context, callback) {
//console.log('Received event:', JSON.stringify(event, null, 2));
var operation = event.operation;
if (event.tableName) {
event.payload.TableName = event.tableName;
}
switch (operation) {
case 'create':
dynamo.put(event.payload, callback);
break;
case 'read':
dynamo.get(event.payload, callback);
break;
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
77587e3916e2-1
|
break;
case 'read':
dynamo.get(event.payload, callback);
break;
case 'update':
dynamo.update(event.payload, callback);
break;
case 'delete':
dynamo.delete(event.payload, callback);
break;
case 'list':
dynamo.scan(event.payload, callback);
break;
case 'echo':
callback(null, "Success");
break;
case 'ping':
callback(null, "pong");
break;
default:
callback('Unknown operation: ${operation}');
}
};
```
**To create the function**
1. Copy the sample code into a file named `index.js`\.
1. Create a deployment package\.
```
$ zip function.zip index.js
```
1. Create a Lambda function with the `create-function` command\.
```
$ aws lambda create-function --function-name LambdaFunctionOverHttps \
--zip-file fileb://function.zip --handler index.handler --runtime nodejs12.x \
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
77587e3916e2-2
|
--zip-file fileb://function.zip --handler index.handler --runtime nodejs12.x \
--role arn:aws:iam::123456789012:role/service-role/lambda-apigateway-role
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
58d703866809-0
|
Invoke the function manually using the sample event data\. We recommend that you invoke the function using the console because the console UI provides a user\-friendly interface for reviewing the execution results, including the execution summary, logs written by your code, and the results returned by the function \(because the console always performs synchronous execution—invokes the Lambda function using the `RequestResponse` invocation type\)\.
**To test the Lambda function**
1. Copy the following JSON into a file and save it as `input.txt`\.
```
{
"operation": "echo",
"payload": {
"somekey1": "somevalue1",
"somekey2": "somevalue2"
}
}
```
1. Execute the following `invoke` command:
```
$ aws lambda invoke --function-name LambdaFunctionOverHttps \
--payload fileb://input.txt outputfile.txt
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
af878ec702b0-0
|
In this step, you associate your Lambda function with a method in the API that you created using Amazon API Gateway and test the end\-to\-end experience\. That is, when an HTTP request is sent to an API method, Amazon API Gateway invokes your Lambda function\.
First, you create an API \(`DynamoDBOperations`\) using Amazon API Gateway with one resource \(`DynamoDBManager`\) and one method \(`POST`\)\. You associate the `POST` method with your Lambda function\. Then, you test the end\-to\-end experience\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
2b25337157d0-0
|
Run the following `create-rest-api` command to create the `DynamoDBOperations` API for this tutorial\.
```
$ aws apigateway create-rest-api --name DynamoDBOperations
{
"id": "bs8fqo6bp0",
"name": "DynamoDBOperations",
"createdDate": 1539803980,
"apiKeySource": "HEADER",
"endpointConfiguration": {
"types": [
"EDGE"
]
}
}
```
Save the API ID for use in further commands\. You also need the ID of the API root resource\. To get the ID, run the `get-resources` command\.
```
$ API=bs8fqo6bp0
$ aws apigateway get-resources --rest-api-id $API
{
"items": [
{
"path": "/",
"id": "e8kitthgdb"
}
]
}
```
At this time you only have the root resource, but you add more resources in the next step\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
1d43c4dbc42c-0
|
Run the following `create-resource` command to create a resource \(`DynamoDBManager`\) in the API that you created in the preceding section\.
```
$ aws apigateway create-resource --rest-api-id $API --path-part DynamoDBManager \
--parent-id e8kitthgdb
{
"path": "/DynamoDBManager",
"pathPart": "DynamoDBManager",
"id": "iuig5w",
"parentId": "e8kitthgdb"
}
```
Note the ID in the response\. This is the ID of the `DynamoDBManager` resource that you created\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
49c0016e4239-0
|
Run the following `put-method` command to create a `POST` method on the `DynamoDBManager` resource in your API\.
```
$ RESOURCE=iuig5w
$ aws apigateway put-method --rest-api-id $API --resource-id $RESOURCE \
--http-method POST --authorization-type NONE
{
"apiKeyRequired": false,
"httpMethod": "POST",
"authorizationType": "NONE"
}
```
We specify `NONE` for the `--authorization-type` parameter, which means that unauthenticated requests for this method are supported\. This is fine for testing but in production you should use either the key\-based or role\-base authentication\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
3778218c88a9-0
|
Run the following command to set the Lambda function as the integration point for the `POST` method\. This is the method Amazon API Gateway invokes when you make an HTTP request for the `POST` method endpoint\. This command and others use ARNs that include your account ID and region\. Save these to variables \(you can find your account ID in the role ARN that you used to create the function\)\.
```
$ REGION=us-east-2
$ ACCOUNT=123456789012
$ aws apigateway put-integration --rest-api-id $API --resource-id $RESOURCE \
--http-method POST --type AWS --integration-http-method POST \
--uri arn:aws:apigateway:$REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:$REGION:$ACCOUNT:function:LambdaFunctionOverHttps/invocations
{
"type": "AWS",
"httpMethod": "POST",
"uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:123456789012:function:LambdaFunctionOverHttps/invocations",
"passthroughBehavior": "WHEN_NO_MATCH",
"timeoutInMillis": 29000,
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
3778218c88a9-1
|
"passthroughBehavior": "WHEN_NO_MATCH",
"timeoutInMillis": 29000,
"cacheNamespace": "iuig5w",
"cacheKeyParameters": []
}
```
`--integration-http-method` is the method that API Gateway uses to communicate with AWS Lambda\. `--uri` is unique identifier for the endpoint to which Amazon API Gateway can send request\.
Set `content-type` of the `POST` method response and integration response to JSON as follows:
+ Run the following command to set the `POST` method response to JSON\. This is the response type that your API method returns\.
```
$ aws apigateway put-method-response --rest-api-id $API \
--resource-id $RESOURCE --http-method POST \
--status-code 200 --response-models application/json=Empty
{
"statusCode": "200",
"responseModels": {
"application/json": "Empty"
}
}
```
+ Run the following command to set the `POST` method integration response to JSON\. This is the response type that Lambda function returns\.
```
$ aws apigateway put-integration-response --rest-api-id $API \
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
3778218c88a9-2
|
```
$ aws apigateway put-integration-response --rest-api-id $API \
--resource-id $RESOURCE --http-method POST \
--status-code 200 --response-templates application/json=""
{
"statusCode": "200",
"responseTemplates": {
"application/json": null
}
}
```
**Note**
If you encounter an error running this command, you can use escape characters around the response template field for more clarity\. The text `application/json=""` becomes `"{\"application/json"\":""\"\"}""`\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
53f317807695-0
|
In this step, you deploy the API that you created to a stage called `prod`\.
```
$ aws apigateway create-deployment --rest-api-id $API --stage-name prod
{
"id": "20vgsz",
"createdDate": 1539820012
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
2b0f07d88f81-0
|
Now that you have an API created using Amazon API Gateway and you've deployed it, you can test\. First, you need to add permissions so that Amazon API Gateway can invoke your Lambda function when you send HTTP request to the `POST` method\.
To do this, you need to add a permission to the permissions policy associated with your Lambda function\. Run the following `add-permission` AWS Lambda command to grant the Amazon API Gateway service principal \(`apigateway.amazonaws.com`\) permissions to invoke your Lambda function \(`LambdaFunctionOverHttps`\)\.
```
$ aws lambda add-permission --function-name LambdaFunctionOverHttps \
--statement-id apigateway-test-2 --action lambda:InvokeFunction \
--principal apigateway.amazonaws.com \
--source-arn "arn:aws:execute-api:$REGION:$ACCOUNT:$API/*/POST/DynamoDBManager"
{
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
2b0f07d88f81-1
|
{
"Statement": "{\"Sid\":\"apigateway-test-2\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"apigateway.amazonaws.com\"},\"Action\":\"lambda:InvokeFunction\",\"Resource\":\"arn:aws:lambda:us-east-2:123456789012:function:LambdaFunctionOverHttps\",\"Condition\":{\"ArnLike\":{\"AWS:SourceArn\":\"arn:aws:execute-api:us-east-2:123456789012:mnh1yprki7/*/POST/DynamoDBManager\"}}}"
}
```
You must grant this permission to enable testing \(if you go to the Amazon API Gateway and choose **Test** to test the API method, you need this permission\)\. Note the `--source-arn` specifies a wildcard character \(\*\) as the stage value \(indicates testing only\)\. This allows you to test without deploying the API\.
**Note**
If your function and API are in different regions, the region identifier in the source ARN must match the region of the function, not the region of the API\.
Now, run the same command again, but this time you grant to your deployed API permissions to invoke the Lambda function\.
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
2b0f07d88f81-2
|
Now, run the same command again, but this time you grant to your deployed API permissions to invoke the Lambda function\.
```
$ aws lambda add-permission --function-name LambdaFunctionOverHttps \
--statement-id apigateway-prod-2 --action lambda:InvokeFunction \
--principal apigateway.amazonaws.com \
--source-arn "arn:aws:execute-api:$REGION:$ACCOUNT:$API/prod/POST/DynamoDBManager"
{
"Statement": "{\"Sid\":\"apigateway-prod-2\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"apigateway.amazonaws.com\"},\"Action\":\"lambda:InvokeFunction\",\"Resource\":\"arn:aws:lambda:us-east-2:123456789012:function:LambdaFunctionOverHttps\",\"Condition\":{\"ArnLike\":{\"AWS:SourceArn\":\"arn:aws:execute-api:us-east-2:123456789012:mnh1yprki7/prod/POST/DynamoDBManager\"}}}"
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
2b0f07d88f81-3
|
}
```
You grant this permission so that your deployed API has permissions to invoke the Lambda function\. Note that the `--source-arn` specifies a `prod` which is the stage name we used when deploying the API\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
55091e186d0c-0
|
Create the DynamoDB table that the Lambda function uses\.
**To create a DynamoDB table**
1. Open the [DynamoDB console](https://console.aws.amazon.com/dynamodb)\.
1. Choose **Create table**\.
1. Create a table with the following settings\.
+ **Table name** – **lambda\-apigateway**
+ **Primary key** – **id** \(string\)
1. Choose **Create**\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
6e57eb7b61eb-0
|
In this step, you are ready to send an HTTP request to the `POST` method endpoint\. You can use either Curl or a method \(`test-invoke-method`\) provided by Amazon API Gateway\.
You can use Amazon API Gateway CLI commands to send an HTTP `POST` request to the resource \(`DynamoDBManager`\) endpoint\. Because you deployed your Amazon API Gateway, you can use Curl to invoke the methods for the same operation\.
The Lambda function supports using the `create` operation to create an item in your DynamoDB table\. To request this operation, use the following JSON:
**Example create\-item\.json**
```
{
"operation": "create",
"tableName": "lambda-apigateway",
"payload": {
"Item": {
"id": "1234ABCD",
"number": 5
}
}
}
```
Save the test input to a file named `create-item.json`\. Run the `test-invoke-method` Amazon API Gateway command to send an HTTP `POST` method request to the resource \(`DynamoDBManager`\) endpoint\.
```
$ aws apigateway test-invoke-method --rest-api-id $API \
--resource-id $RESOURCE --http-method POST --path-with-query-string "" \
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
6e57eb7b61eb-1
|
--resource-id $RESOURCE --http-method POST --path-with-query-string "" \
--body file://create-item.json
```
Or, you can use the following Curl command:
```
$ curl -X POST -d "{\"operation\":\"create\",\"tableName\":\"lambda-apigateway\",\"payload\":{\"Item\":{\"id\":\"1\",\"name\":\"Bob\"}}}" https://$API.execute-api.$REGION.amazonaws.com/prod/DynamoDBManager
```
To send request for the `echo` operation that your Lambda function supports, you can use the following request payload:
**Example echo\.json**
```
{
"operation": "echo",
"payload": {
"somekey1": "somevalue1",
"somekey2": "somevalue2"
}
}
```
Save the test input to a file named `echo.json`\. Run the `test-invoke-method` Amazon API Gateway CLI command to send an HTTP `POST` method request to the resource \(`DynamoDBManager`\) endpoint using the preceding JSON in the request body\.
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
6e57eb7b61eb-2
|
```
$ aws apigateway test-invoke-method --rest-api-id $API \
--resource-id $RESOURCE --http-method POST --path-with-query-string "" \
--body file://echo.json
```
Or, you can use the following Curl command:
```
$ curl -X POST -d "{\"operation\":\"echo\",\"payload\":{\"somekey1\":\"somevalue1\",\"somekey2\":\"somevalue2\"}}" https://$API.execute-api.$REGION.amazonaws.com/prod/DynamoDBManager
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
654d839f2095-0
|
You can now delete the resources that you created for this tutorial, unless you want to retain them\. By deleting AWS resources that you are no longer using, you prevent unnecessary charges to your AWS account\.
**To delete the Lambda function**
1. Open the [Functions page](https://console.aws.amazon.com/lambda/home#/functions) of the Lambda console\.
1. Select the function that you created\.
1. Choose **Actions**, **Delete**\.
1. Choose **Delete**\.
**To delete the execution role**
1. Open the [Roles page](https://console.aws.amazon.com/iam/home#/roles) of the IAM console\.
1. Select the execution role that you created\.
1. Choose **Delete role**\.
1. Choose **Yes, delete**\.
**To delete the API**
1. Open the [APIs page](https://console.aws.amazon.com/apigateway/main/apis) of the API Gateway console\.
1. Select the API you created\.
1. Choose **Actions**, **Delete**\.
1. Choose **Delete**\.
**To delete the DynamoDB table**
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
654d839f2095-1
|
1. Choose **Delete**\.
**To delete the DynamoDB table**
1. Open the [Tables page](https://console.aws.amazon.com/dynamodb/home#tables:) of the DynamoDB console\.
1. Select the table you created\.
1. Choose **Delete**\.
1. Enter **delete** in the text box\.
1. Choose **Delete**\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/services-apigateway-tutorial.md
|
afaadee1ff15-0
|
AWS Lambda provides a management console and API for managing and invoking functions\. It provides runtimes that support a standard set of features so that you can easily switch between languages and frameworks, depending on your needs\. In addition to functions, you can also create versions, aliases, layers, and custom runtimes\.
**Topics**
+ [Programming model](#gettingstarted-features-programmingmodel)
+ [Deployment package](#gettingstarted-features-package)
+ [Layers](#gettingstarted-features-layers)
+ [Scaling](#gettingstarted-features-scaling)
+ [Concurrency controls](#gettingstarted-features-concurrency)
+ [Asynchronous invocation](#gettingstarted-features-async)
+ [Event source mappings](#gettingstarted-features-eventsourcemapping)
+ [Destinations](#gettingstarted-features-destinations)
+ [Function blueprints](#gettingstarted-features-blueprints)
+ [Application templates](#gettingstarted-features-templates)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/gettingstarted-features.md
|
2908350abc78-0
|
Authoring specifics vary between runtimes, but all runtimes share a common programming model that defines the interface between your code and the runtime code\. You tell the runtime which method to run by defining a **handler** in the function configuration, and the runtime runs that method\. The runtime passes in objects to the handler that contain the invocation **event** and the **context**, such as the function name and request ID\.
When the handler finishes processing the first event, the runtime sends it another\. The function's class stays in memory, so clients and variables that are declared outside of the handler method in **initialization code** can be reused\. To save processing time on subsequent events, create reusable resources like AWS SDK clients during initialization\. Once initialized, each instance of your function can process thousands of requests\.
Initialization is billed as part of the duration for the first invocation processed by an instance of your function\. When [X\-Ray tracing](services-xray.md) is enabled, the runtime records separate subsegments for initialization and execution\.
![\[\]](http://docs.aws.amazon.com/lambda/latest/dg/images/features-initialization-trace.png)
Your function also has access to local storage in the `/tmp` directory\. Instances of your function that are serving requests remain active for a few hours before being recycled\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/gettingstarted-features.md
|
2908350abc78-1
|
Your function also has access to local storage in the `/tmp` directory\. Instances of your function that are serving requests remain active for a few hours before being recycled\.
The runtime captures **logging** output from your function and sends it to Amazon CloudWatch Logs\. In addition to logging your function's output, the runtime also logs entries when execution starts and ends\. This includes a report log with the request ID, billed duration, initialization duration, and other details\. If your function throws an **error**, the runtime returns that error to the invoker\.
**Note**
Logging is subject to [CloudWatch Logs limits](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html)\. Log data can be lost due to throttling or, in some cases, when an instance of your function is stopped\.
For a hands\-on introduction to the programming model in your preferred programming language, see the following chapters\.
+ [Building Lambda functions with Node\.js](lambda-nodejs.md)
+ [Building Lambda functions with Python](lambda-python.md)
+ [Building Lambda functions with Ruby](lambda-ruby.md)
+ [Building Lambda functions with Java](lambda-java.md)
+ [Building Lambda functions with Go](lambda-golang.md)
+ [Building Lambda functions with C\#](lambda-csharp.md)
+ [Building Lambda functions with PowerShell](lambda-powershell.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/gettingstarted-features.md
|
2908350abc78-2
|
+ [Building Lambda functions with PowerShell](lambda-powershell.md)
Lambda scales your function by running additional instances of it as demand increases, and by stopping instances as demand decreases\. Unless noted otherwise, incoming requests might be processed out of order or concurrently\. Store your application's state in other services, and don't rely on instances of your function being long lived\. Use local storage and class\-level objects to increase performance, but keep the size of your deployment package and the amount of data that you transfer onto the execution environment to a minimum\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/gettingstarted-features.md
|
35674ebeee9f-0
|
Your function's code consists of scripts or compiled programs and their dependencies\. When you author functions in the Lambda console or a toolkit, the client creates a ZIP archive of your code called a deployment package\. The client then sends the package to the Lambda service\. When you manage functions with the Lambda API, command line tools, or SDKs, you create the deployment package\. You also need to create a deployment package manually for compiled languages and to add dependencies to your function\.
For language\-specific instructions, see the following topics\.
+ [AWS Lambda deployment package in Node\.js](nodejs-package.md)
+ [AWS Lambda deployment package in Python](python-package.md)
+ [AWS Lambda deployment package in Ruby](ruby-package.md)
+ [AWS Lambda deployment package in Java](java-package.md)
+ [AWS Lambda deployment package in Go](golang-package.md)
+ [AWS Lambda Deployment Package in C\#](csharp-package.md)
+ [AWS Lambda deployment package in PowerShell](powershell-package.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/gettingstarted-features.md
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.