id
stringlengths 14
16
| text
stringlengths 1
2.43k
| source
stringlengths 99
229
|
|---|---|---|
96a3ba01bb0b-0
|
To grant layer\-usage permission to another account, add a statement to the layer version's permissions policy with the `add-layer-version-permission` command\. In each statement, you can grant permission to a single account, all accounts, or an organization\.
```
$ aws lambda add-layer-version-permission --layer-name xray-sdk-nodejs --statement-id xaccount \
--action lambda:GetLayerVersion --principal 210987654321 --version-number 1 --output text
e210ffdc-e901-43b0-824b-5fcd0dd26d16 {"Sid":"xaccount","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::210987654321:root"},"Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-2:123456789012:layer:xray-sdk-nodejs:1"}
```
Permissions only apply to a single version of a layer\. Repeat the procedure each time you create a new layer version\.
To grant permission to all accounts in an organization, use the `organization-id` option\. The following example grants all accounts in an organization permission to use version 3 of a layer\.
```
$ aws lambda add-layer-version-permission --layer-name my-layer \
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/access-control-resource-based.md
|
96a3ba01bb0b-1
|
```
$ aws lambda add-layer-version-permission --layer-name my-layer \
--statement-id engineering-org --version-number 3 --principal '*' \
--action lambda:GetLayerVersion --organization-id o-t194hfs8cz --output text
b0cd9796-d4eb-4564-939f-de7fe0b42236 {"Sid":"engineering-org","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-east-2:123456789012:layer:my-layer:3","Condition":{"StringEquals":{"aws:PrincipalOrgID":"o-t194hfs8cz"}}}"
```
To grant permission to all AWS accounts, use `*` for the principal, and omit the organization ID\. For multiple accounts or organizations, you need to add multiple statements\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/access-control-resource-based.md
|
101eef30189e-0
|
To view a function's resource\-based policy, use the `get-policy` command\.
```
$ aws lambda get-policy --function-name my-function --output text
{"Version":"2012-10-17","Id":"default","Statement":[{"Sid":"sns","Effect":"Allow","Principal":{"Service":"s3.amazonaws.com"},"Action":"lambda:InvokeFunction","Resource":"arn:aws:lambda:us-east-2:123456789012:function:my-function","Condition":{"ArnLike":{"AWS:SourceArn":"arn:aws:sns:us-east-2:123456789012:lambda*"}}}]} 7c681fc9-b791-4e91-acdf-eb847fdaa0f0
```
For versions and aliases, append the version number or alias to the function name\.
```
$ aws lambda get-policy --function-name my-function:PROD
```
To remove permissions from your function, use `remove-permission`\.
```
$ aws lambda remove-permission --function-name example --statement-id sns
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/access-control-resource-based.md
|
101eef30189e-1
|
```
$ aws lambda remove-permission --function-name example --statement-id sns
```
Use the `get-layer-version-policy` command to view the permissions on a layer\. Use `remove-layer-version-permission` to remove statements from the policy\.
```
$ aws lambda get-layer-version-policy --layer-name my-layer --version-number 3 --output text
b0cd9796-d4eb-4564-939f-de7fe0b42236 {"Sid":"engineering-org","Effect":"Allow","Principal":"*","Action":"lambda:GetLayerVersion","Resource":"arn:aws:lambda:us-west-2:123456789012:layer:my-layer:3","Condition":{"StringEquals":{"aws:PrincipalOrgID":"o-t194hfs8cz"}}}"
$ aws lambda remove-layer-version-permission --layer-name my-layer --version-number 3 --statement-id engineering-org
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/access-control-resource-based.md
|
ec0603dc44fe-0
|
When an exception occurs in your Lambda function, Lambda will report the exception information back to you\. Exceptions can occur in two different places:
+ Initialization \(Lambda loading your code, validating the handler string, and creating an instance of your class if it is non\-static\)\.
+ The Lambda function invocation\.
The serialized exception information is returned as the payload as a modeled JSON object and outputted to CloudWatch logs\.
In the initialization phase, exceptions can be thrown for invalid handler strings, a rule\-breaking type or method \(see [Lambda function handler restrictions ](csharp-handler.md#csharp-handler-restrictions)\), or any other validation method \(such as forgetting the serializer attribute and having a POCO as your input or output type\)\. These exceptions are of type `LambdaException`\. For example:
```
{
"errorType": "LambdaException",
"errorMessage": "Invalid lambda function handler: 'http://this.is.not.a.valid.handler/'.
The valid format is 'ASSEMBLY::TYPE::METHOD'."
}
```
If your constructor throws an exception, the error type is also of type `LambdaException`, but the exception thrown during construction is provided in the `cause` property, which is itself a modeled exception object:
```
{
"errorType": "LambdaException",
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/csharp-exceptions.md
|
ec0603dc44fe-1
|
```
{
"errorType": "LambdaException",
"errorMessage": "An exception was thrown when the constructor for type 'LambdaExceptionTestFunction.ThrowExceptionInConstructor'
was invoked. Check inner exception for more details.",
"cause": {
"errorType": "TargetInvocationException",
"errorMessage": "Exception has been thrown by the target of an invocation.",
"stackTrace": [
"at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&canBeCached,
RuntimeMethodHandleInternal&ctor, Boolean& bNeedSecurityCheck)",
"at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)",
"at System.Activator.CreateInstance(Type type, Boolean nonPublic)",
"at System.Activator.CreateInstance(Type type)"
],
"cause": {
"errorType": "ArithmeticException",
"errorMessage": "Sorry, 2 + 2 = 5",
"stackTrace": [
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/csharp-exceptions.md
|
ec0603dc44fe-2
|
"errorMessage": "Sorry, 2 + 2 = 5",
"stackTrace": [
"at LambdaExceptionTestFunction.ThrowExceptionInConstructor..ctor()"
]
}
}
}
```
As the example shows, the inner exceptions are always preserved \(as the `cause` property\), and can be deeply nested\.
Exceptions can also occur during invocation\. In this case, the exception type is preserved and the exception is returned directly as the payload and in the CloudWatch logs\. For example:
```
{
"errorType": "AggregateException",
"errorMessage": "One or more errors occurred. (An unknown web exception occurred!)",
"stackTrace": [
"at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)",
"at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)",
"at lambda_method(Closure , Stream , Stream , ContextInfo )"
],
"cause": {
"errorType": "UnknownWebException",
"errorMessage": "An unknown web exception occurred!",
"stackTrace": [
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/csharp-exceptions.md
|
ec0603dc44fe-3
|
"errorMessage": "An unknown web exception occurred!",
"stackTrace": [
"at LambdaDemo107.LambdaEntryPoint.<GetUriResponse>d__1.MoveNext()",
"--- End of stack trace from previous location where exception was thrown ---",
"at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)",
"at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)",
"at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()",
"at LambdaDemo107.LambdaEntryPoint.<CheckWebsiteStatus>d__0.MoveNext()"
],
"cause": {
"errorType": "WebException",
"errorMessage": "An error occurred while sending the request. SSL peer certificate or SSH remote key was not OK",
"stackTrace": [
"at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)",
"at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)",
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/csharp-exceptions.md
|
ec0603dc44fe-4
|
"--- End of stack trace from previous location where exception was thrown ---",
"at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)",
"at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)",
"at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()",
"at LambdaDemo107.LambdaEntryPoint.<GetUriResponse>d__1.MoveNext()"
],
"cause": {
"errorType": "HttpRequestException",
"errorMessage": "An error occurred while sending the request.",
"stackTrace": [
"at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)",
"at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)",
"at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext()",
"--- End of stack trace from previous location where exception was thrown ---",
"at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)",
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/csharp-exceptions.md
|
ec0603dc44fe-5
|
"at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)",
"at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)",
"at System.Net.HttpWebRequest.<SendRequest>d__63.MoveNext()",
"--- End of stack trace from previous location where exception was thrown ---",
"at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)",
"at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)",
"at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)"
],
"cause": {
"errorType": "CurlException",
"errorMessage": "SSL peer certificate or SSH remote key was not OK",
"stackTrace": [
"at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)",
"at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)"
]
}
}
}
}
}
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/csharp-exceptions.md
|
ec0603dc44fe-6
|
]
}
}
}
}
}
```
The method in which error information is conveyed depends on the invocation type:
+ `RequestResponse` invocation type \(that is, synchronous execution\): In this case, you get the error message back\.
For example, if you invoke a Lambda function using the Lambda console, the `RequestResponse` is always the invocation type and the console displays the error information returned by AWS Lambda in the **Execution result** section of the console\.
+ `Event` invocation type \(that is, asynchronous execution\): In this case AWS Lambda does not return anything\. Instead, it logs the error information in CloudWatch Logs and CloudWatch metrics\.
Depending on the event source, AWS Lambda may retry the failed Lambda function\. For more information, see [Error handling and automatic retries in AWS Lambda](invocation-retries.md)\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/csharp-exceptions.md
|
6b953372ae4d-0
|
When your code raises an error, Lambda generates a JSON representation of the error\. This error document appears in the invocation log and, for synchronous invocations, in the output\.
**Example lambda\_function\.py file β Exception**
```
def lambda_handler(event, context):
return x + 10
```
This code results in a name error\. Lambda catches the error and generates a JSON document with fields for the error message, the type, and the stack trace\.
```
{
"errorMessage": "name 'x' is not defined",
"errorType": "NameError",
"stackTrace": [
" File \"/var/task/error_function.py\", line 2, in lambda_handler\n return x + 10\n"
]
}
```
When you invoke the function from the command line, the AWS CLI splits the response into two documents\. To indicate that a function error occurred, the response displayed in the terminal includes a `FunctionError` field\. The response or error returned by the function is written to the output file\.
```
$ aws lambda invoke --function-name my-function out.json
{
"StatusCode": 200,
"FunctionError": "Unhandled",
"ExecutedVersion": "$LATEST"
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-exceptions.md
|
6b953372ae4d-1
|
"StatusCode": 200,
"FunctionError": "Unhandled",
"ExecutedVersion": "$LATEST"
}
```
View the output file to see the error document\.
```
$ cat out.json
{"errorMessage": "name 'x' is not defined", "errorType": "NameError", "stackTrace": [" File \"/var/task/error_function.py\", line 2, in lambda_handler\n return x + 10\n"]}
```
**Note**
The 200 \(success\) status code in the response from Lambda indicates that there wasn't an error with the request that you sent to Lambda\. For issues that result in an error status code, see [Errors](API_Invoke.md#API_Invoke_Errors)\.
Lambda also records up to 256 KB of the error object in the function's logs\. To view logs when you invoke the function from the command line, use the `--log-type` option and decode the base64 string in the response\.
```
$ aws lambda invoke --function-name my-function out.json --log-type Tail \
--query 'LogResult' --output text | base64 -d
START RequestId: fc4f8810-88ff-4800-974c-12cec018a4b9 Version: $LATEST
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-exceptions.md
|
6b953372ae4d-2
|
START RequestId: fc4f8810-88ff-4800-974c-12cec018a4b9 Version: $LATEST
return x + 10/lambda_function.py", line 2, in lambda_handler
END RequestId: fc4f8810-88ff-4800-974c-12cec018a4b9
REPORT RequestId: fc4f8810-88ff-4800-974c-12cec018a4b9 Duration: 12.33 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 56 MB
```
For more information about logs, see [AWS Lambda function logging in Python](python-logging.md)\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-exceptions.md
|
1aebf7259a2f-0
|
The following sections explain how common programming patterns and core concepts apply when authoring Lambda function code in C\#\.
AWS Lambda provides the following libraries for C\# functions:
+ **Amazon\.Lambda\.Core** β This library provides a static Lambda logger, serialization interfaces and a context object\. The `Context` object \([AWS Lambda context object in C\#](csharp-context.md)\) provides runtime information about your Lambda function\.
+ **Amazon\.Lambda\.Serialization\.Json ** β This is an implementation of the serialization interface in **Amazon\.Lambda\.Core**\.
+ **Amazon\.Lambda\.Logging\.AspNetCore ** β This provides a library for logging from ASP\.NET\.
+ Event objects \(POCOs\) for several AWS services, including:
+ **Amazon\.Lambda\.APIGatewayEvents **
+ **Amazon\.Lambda\.CognitoEvents **
+ **Amazon\.Lambda\.ConfigEvents **
+ **Amazon\.Lambda\.DynamoDBEvents **
+ **Amazon\.Lambda\.KinesisEvents **
+ **Amazon\.Lambda\.S3Events **
+ **Amazon\.Lambda\.SQSEvents **
+ **Amazon\.Lambda\.SNSEvents **
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-csharp.md
|
1aebf7259a2f-1
|
+ **Amazon\.Lambda\.SQSEvents **
+ **Amazon\.Lambda\.SNSEvents **
These packages are available at [Nuget packages](https://www.nuget.org/packages/)\.
**\.NET runtimes**
| Name | Identifier | Operating system |
| --- | --- | --- |
| \.NET Core 3\.1 | `dotnetcore3.1` | Amazon Linux 2 |
| \.NET Core 2\.1 | `dotnetcore2.1` | Amazon Linux |
**Note**
To get started with application development in your local environment, deploy one of the sample applications available in this guide's GitHub repository\.
[blank\-csharp](https://github.com/awsdocs/aws-lambda-developer-guide/tree/master/sample-apps/blank-csharp) β A C\# function that shows the use of Lambda's \.NET libraries, logging, environment variables, AWS X\-Ray tracing, unit tests, and the AWS SDK\.
[ec2\-spot](https://github.com/awsdocs/aws-lambda-developer-guide/tree/master/sample-apps/ec2-spot) β A function that manages spot instance requests in Amazon EC2\.
**Topics**
+ [AWS Lambda Deployment Package in C\#](csharp-package.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-csharp.md
|
1aebf7259a2f-2
|
**Topics**
+ [AWS Lambda Deployment Package in C\#](csharp-package.md)
+ [AWS Lambda function handler in C\#](csharp-handler.md)
+ [AWS Lambda context object in C\#](csharp-context.md)
+ [AWS Lambda function logging in C\#](csharp-logging.md)
+ [AWS Lambda function errors in C\#](csharp-exceptions.md)
+ [Instrumenting C\# code in AWS Lambda](csharp-tracing.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/lambda-csharp.md
|
b65e0fb55510-0
|
Details about the provisioned concurrency configuration for a function alias or version\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ProvisionedConcurrencyConfigListItem.md
|
a5db045f26d7-0
|
**AllocatedProvisionedConcurrentExecutions** <a name="SSS-Type-ProvisionedConcurrencyConfigListItem-AllocatedProvisionedConcurrentExecutions"></a>
The amount of provisioned concurrency allocated\.
Type: Integer
Valid Range: Minimum value of 0\.
Required: No
**AvailableProvisionedConcurrentExecutions** <a name="SSS-Type-ProvisionedConcurrencyConfigListItem-AvailableProvisionedConcurrentExecutions"></a>
The amount of provisioned concurrency available\.
Type: Integer
Valid Range: Minimum value of 0\.
Required: No
**FunctionArn** <a name="SSS-Type-ProvisionedConcurrencyConfigListItem-FunctionArn"></a>
The Amazon Resource Name \(ARN\) of the alias or version\.
Type: String
Pattern: `arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(:(\$LATEST|[a-zA-Z0-9-_]+))?`
Required: No
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ProvisionedConcurrencyConfigListItem.md
|
a5db045f26d7-1
|
Required: No
**LastModified** <a name="SSS-Type-ProvisionedConcurrencyConfigListItem-LastModified"></a>
The date and time that a user last updated the configuration, in [ISO 8601 format](https://www.iso.org/iso-8601-date-and-time-format.html)\.
Type: String
Required: No
**RequestedProvisionedConcurrentExecutions** <a name="SSS-Type-ProvisionedConcurrencyConfigListItem-RequestedProvisionedConcurrentExecutions"></a>
The amount of provisioned concurrency requested\.
Type: Integer
Valid Range: Minimum value of 1\.
Required: No
**Status** <a name="SSS-Type-ProvisionedConcurrencyConfigListItem-Status"></a>
The status of the allocation process\.
Type: String
Valid Values:` IN_PROGRESS | READY | FAILED`
Required: No
**StatusReason** <a name="SSS-Type-ProvisionedConcurrencyConfigListItem-StatusReason"></a>
For failed allocations, the reason that provisioned concurrency could not be allocated\.
Type: String
Required: No
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ProvisionedConcurrencyConfigListItem.md
|
9ed1422d9a01-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/ProvisionedConcurrencyConfigListItem)
+ [AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/ProvisionedConcurrencyConfigListItem)
+ [AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/ProvisionedConcurrencyConfigListItem)
+ [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lambda-2015-03-31/ProvisionedConcurrencyConfigListItem)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ProvisionedConcurrencyConfigListItem.md
|
cc4c7ea9baa6-0
|
The following actions are supported:
+ [AddLayerVersionPermission](API_AddLayerVersionPermission.md)
+ [AddPermission](API_AddPermission.md)
+ [CreateAlias](API_CreateAlias.md)
+ [CreateEventSourceMapping](API_CreateEventSourceMapping.md)
+ [CreateFunction](API_CreateFunction.md)
+ [DeleteAlias](API_DeleteAlias.md)
+ [DeleteEventSourceMapping](API_DeleteEventSourceMapping.md)
+ [DeleteFunction](API_DeleteFunction.md)
+ [DeleteFunctionConcurrency](API_DeleteFunctionConcurrency.md)
+ [DeleteFunctionEventInvokeConfig](API_DeleteFunctionEventInvokeConfig.md)
+ [DeleteLayerVersion](API_DeleteLayerVersion.md)
+ [DeleteProvisionedConcurrencyConfig](API_DeleteProvisionedConcurrencyConfig.md)
+ [GetAccountSettings](API_GetAccountSettings.md)
+ [GetAlias](API_GetAlias.md)
+ [GetEventSourceMapping](API_GetEventSourceMapping.md)
+ [GetFunction](API_GetFunction.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_Operations.md
|
cc4c7ea9baa6-1
|
+ [GetFunction](API_GetFunction.md)
+ [GetFunctionConcurrency](API_GetFunctionConcurrency.md)
+ [GetFunctionConfiguration](API_GetFunctionConfiguration.md)
+ [GetFunctionEventInvokeConfig](API_GetFunctionEventInvokeConfig.md)
+ [GetLayerVersion](API_GetLayerVersion.md)
+ [GetLayerVersionByArn](API_GetLayerVersionByArn.md)
+ [GetLayerVersionPolicy](API_GetLayerVersionPolicy.md)
+ [GetPolicy](API_GetPolicy.md)
+ [GetProvisionedConcurrencyConfig](API_GetProvisionedConcurrencyConfig.md)
+ [Invoke](API_Invoke.md)
+ [InvokeAsync](API_InvokeAsync.md)
+ [ListAliases](API_ListAliases.md)
+ [ListEventSourceMappings](API_ListEventSourceMappings.md)
+ [ListFunctionEventInvokeConfigs](API_ListFunctionEventInvokeConfigs.md)
+ [ListFunctions](API_ListFunctions.md)
+ [ListLayers](API_ListLayers.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_Operations.md
|
cc4c7ea9baa6-2
|
+ [ListFunctions](API_ListFunctions.md)
+ [ListLayers](API_ListLayers.md)
+ [ListLayerVersions](API_ListLayerVersions.md)
+ [ListProvisionedConcurrencyConfigs](API_ListProvisionedConcurrencyConfigs.md)
+ [ListTags](API_ListTags.md)
+ [ListVersionsByFunction](API_ListVersionsByFunction.md)
+ [PublishLayerVersion](API_PublishLayerVersion.md)
+ [PublishVersion](API_PublishVersion.md)
+ [PutFunctionConcurrency](API_PutFunctionConcurrency.md)
+ [PutFunctionEventInvokeConfig](API_PutFunctionEventInvokeConfig.md)
+ [PutProvisionedConcurrencyConfig](API_PutProvisionedConcurrencyConfig.md)
+ [RemoveLayerVersionPermission](API_RemoveLayerVersionPermission.md)
+ [RemovePermission](API_RemovePermission.md)
+ [TagResource](API_TagResource.md)
+ [UntagResource](API_UntagResource.md)
+ [UpdateAlias](API_UpdateAlias.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_Operations.md
|
cc4c7ea9baa6-3
|
+ [UntagResource](API_UntagResource.md)
+ [UpdateAlias](API_UpdateAlias.md)
+ [UpdateEventSourceMapping](API_UpdateEventSourceMapping.md)
+ [UpdateFunctionCode](API_UpdateFunctionCode.md)
+ [UpdateFunctionConfiguration](API_UpdateFunctionConfiguration.md)
+ [UpdateFunctionEventInvokeConfig](API_UpdateFunctionEventInvokeConfig.md)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_Operations.md
|
00e76bf166bb-0
|
Returns the version\-specific settings of a Lambda function or version\. The output includes only options that can vary between versions of a function\. To modify these settings, use [UpdateFunctionConfiguration](API_UpdateFunctionConfiguration.md)\.
To get all of a function's details, including function\-level settings, use [GetFunction](API_GetFunction.md)\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
aeac9ab5cbbb-0
|
```
GET /2015-03-31/functions/FunctionName/configuration?Qualifier=Qualifier HTTP/1.1
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
f366732cb04f-0
|
The request uses the following URI parameters\.
** [FunctionName](#API_GetFunctionConfiguration_RequestSyntax) ** <a name="SSS-GetFunctionConfiguration-request-FunctionName"></a>
The name of the Lambda function, version, or alias\.
**Name formats**
+ **Function name** \- `my-function` \(name\-only\), `my-function:v1` \(with alias\)\.
+ **Function ARN** \- `arn:aws:lambda:us-west-2:123456789012:function:my-function`\.
+ **Partial ARN** \- `123456789012:function:my-function`\.
You can append a version number or alias to any of the formats\. The length constraint applies only to the full ARN\. If you specify only the function name, it is limited to 64 characters in length\.
Length Constraints: Minimum length of 1\. Maximum length of 170\.
Pattern: `(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_\.]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?`
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
f366732cb04f-1
|
Required: Yes
** [Qualifier](#API_GetFunctionConfiguration_RequestSyntax) ** <a name="SSS-GetFunctionConfiguration-request-Qualifier"></a>
Specify a version or alias to get details about a published version of the function\.
Length Constraints: Minimum length of 1\. Maximum length of 128\.
Pattern: `(|[a-zA-Z0-9$_-]+)`
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
6f9104253d9e-0
|
The request does not have a request body\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
e283ad0905db-0
|
```
HTTP/1.1 200
Content-type: application/json
{
"CodeSha256": "string",
"CodeSize": number,
"DeadLetterConfig": {
"TargetArn": "string"
},
"Description": "string",
"Environment": {
"Error": {
"ErrorCode": "string",
"Message": "string"
},
"Variables": {
"string" : "string"
}
},
"FileSystemConfigs": [
{
"Arn": "string",
"LocalMountPath": "string"
}
],
"FunctionArn": "string",
"FunctionName": "string",
"Handler": "string",
"KMSKeyArn": "string",
"LastModified": "string",
"LastUpdateStatus": "string",
"LastUpdateStatusReason": "string",
"LastUpdateStatusReasonCode": "string",
"Layers": [
{
"Arn": "string",
"CodeSize": number
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
e283ad0905db-1
|
"Layers": [
{
"Arn": "string",
"CodeSize": number
}
],
"MasterArn": "string",
"MemorySize": number,
"RevisionId": "string",
"Role": "string",
"Runtime": "string",
"State": "string",
"StateReason": "string",
"StateReasonCode": "string",
"Timeout": number,
"TracingConfig": {
"Mode": "string"
},
"Version": "string",
"VpcConfig": {
"SecurityGroupIds": [ "string" ],
"SubnetIds": [ "string" ],
"VpcId": "string"
}
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-0
|
If the action is successful, the service sends back an HTTP 200 response\.
The following data is returned in JSON format by the service\.
** [CodeSha256](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-CodeSha256"></a>
The SHA256 hash of the function's deployment package\.
Type: String
** [CodeSize](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-CodeSize"></a>
The size of the function's deployment package, in bytes\.
Type: Long
** [DeadLetterConfig](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-DeadLetterConfig"></a>
The function's dead letter queue\.
Type: [DeadLetterConfig](API_DeadLetterConfig.md) object
** [Description](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-Description"></a>
The function's description\.
Type: String
Length Constraints: Minimum length of 0\. Maximum length of 256\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-1
|
The function's description\.
Type: String
Length Constraints: Minimum length of 0\. Maximum length of 256\.
** [Environment](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-Environment"></a>
The function's environment variables\.
Type: [EnvironmentResponse](API_EnvironmentResponse.md) object
** [FileSystemConfigs](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-FileSystemConfigs"></a>
Connection settings for an Amazon EFS file system\.
Type: Array of [FileSystemConfig](API_FileSystemConfig.md) objects
Array Members: Maximum number of 1 item\.
** [FunctionArn](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-FunctionArn"></a>
The function's Amazon Resource Name \(ARN\)\.
Type: String
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-2
|
The function's Amazon Resource Name \(ARN\)\.
Type: String
Pattern: `arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_\.]+(:(\$LATEST|[a-zA-Z0-9-_]+))?`
** [FunctionName](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-FunctionName"></a>
The name of the function\.
Type: String
Length Constraints: Minimum length of 1\. Maximum length of 170\.
Pattern: `(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_\.]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?`
** [Handler](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-Handler"></a>
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-3
|
The function that Lambda calls to begin executing your function\.
Type: String
Length Constraints: Maximum length of 128\.
Pattern: `[^\s]+`
** [KMSKeyArn](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-KMSKeyArn"></a>
The KMS key that's used to encrypt the function's environment variables\. This key is only returned if you've configured a customer managed CMK\.
Type: String
Pattern: `(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()`
** [LastModified](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-LastModified"></a>
The date and time that the function was last updated, in [ISO\-8601 format](https://www.w3.org/TR/NOTE-datetime) \(YYYY\-MM\-DDThh:mm:ss\.sTZD\)\.
Type: String
** [LastUpdateStatus](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-LastUpdateStatus"></a>
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-4
|
The status of the last update that was performed on the function\. This is first set to `Successful` after function creation completes\.
Type: String
Valid Values:` Successful | Failed | InProgress`
** [LastUpdateStatusReason](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-LastUpdateStatusReason"></a>
The reason for the last update that was performed on the function\.
Type: String
** [LastUpdateStatusReasonCode](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-LastUpdateStatusReasonCode"></a>
The reason code for the last update that was performed on the function\.
Type: String
Valid Values:` EniLimitExceeded | InsufficientRolePermissions | InvalidConfiguration | InternalError | SubnetOutOfIPAddresses | InvalidSubnet | InvalidSecurityGroup`
** [Layers](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-Layers"></a>
The function's [ layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-5
|
The function's [ layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)\.
Type: Array of [Layer](API_Layer.md) objects
** [MasterArn](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-MasterArn"></a>
For Lambda@Edge functions, the ARN of the master function\.
Type: String
Pattern: `arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(:(\$LATEST|[a-zA-Z0-9-_]+))?`
** [MemorySize](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-MemorySize"></a>
The memory that's allocated to the function\.
Type: Integer
Valid Range: Minimum value of 128\. Maximum value of 3008\.
** [RevisionId](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-RevisionId"></a>
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-6
|
The latest updated revision of the function or alias\.
Type: String
** [Role](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-Role"></a>
The function's execution role\.
Type: String
Pattern: `arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+`
** [Runtime](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-Runtime"></a>
The runtime environment for the Lambda function\.
Type: String
Valid Values:` nodejs10.x | nodejs12.x | java8 | java8.al2 | java11 | python2.7 | python3.6 | python3.7 | python3.8 | dotnetcore2.1 | dotnetcore3.1 | go1.x | ruby2.5 | ruby2.7 | provided | provided.al2`
** [State](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-State"></a>
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-7
|
The current state of the function\. When the state is `Inactive`, you can reactivate the function by invoking it\.
Type: String
Valid Values:` Pending | Active | Inactive | Failed`
** [StateReason](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-StateReason"></a>
The reason for the function's current state\.
Type: String
** [StateReasonCode](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-StateReasonCode"></a>
The reason code for the function's current state\. When the code is `Creating`, you can't invoke or modify the function\.
Type: String
Valid Values:` Idle | Creating | Restoring | EniLimitExceeded | InsufficientRolePermissions | InvalidConfiguration | InternalError | SubnetOutOfIPAddresses | InvalidSubnet | InvalidSecurityGroup`
** [Timeout](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-Timeout"></a>
The amount of time in seconds that Lambda allows a function to run before stopping it\.
Type: Integer
Valid Range: Minimum value of 1\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
ba500e5b3a87-8
|
The amount of time in seconds that Lambda allows a function to run before stopping it\.
Type: Integer
Valid Range: Minimum value of 1\.
** [TracingConfig](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-TracingConfig"></a>
The function's AWS X\-Ray tracing configuration\.
Type: [TracingConfigResponse](API_TracingConfigResponse.md) object
** [Version](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-Version"></a>
The version of the Lambda function\.
Type: String
Length Constraints: Minimum length of 1\. Maximum length of 1024\.
Pattern: `(\$LATEST|[0-9]+)`
** [VpcConfig](#API_GetFunctionConfiguration_ResponseSyntax) ** <a name="SSS-GetFunctionConfiguration-response-VpcConfig"></a>
The function's networking configuration\.
Type: [VpcConfigResponse](API_VpcConfigResponse.md) object
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
e9f4c3367097-0
|
**InvalidParameterValueException**
One of the parameters in the request is invalid\.
HTTP Status Code: 400
**ResourceNotFoundException**
The resource specified in the request does not exist\.
HTTP Status Code: 404
**ServiceException**
The AWS Lambda service encountered an internal error\.
HTTP Status Code: 500
**TooManyRequestsException**
The request throughput limit was exceeded\.
HTTP Status Code: 429
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
b28c1d2f5334-0
|
For more information about using this API in one of the language\-specific AWS SDKs, see the following:
+ [AWS Command Line Interface](https://docs.aws.amazon.com/goto/aws-cli/lambda-2015-03-31/GetFunctionConfiguration)
+ [AWS SDK for \.NET](https://docs.aws.amazon.com/goto/DotNetSDKV3/lambda-2015-03-31/GetFunctionConfiguration)
+ [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/GetFunctionConfiguration)
+ [AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/GetFunctionConfiguration)
+ [AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/GetFunctionConfiguration)
+ [AWS SDK for JavaScript](https://docs.aws.amazon.com/goto/AWSJavaScriptSDK/lambda-2015-03-31/GetFunctionConfiguration)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
b28c1d2f5334-1
|
+ [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lambda-2015-03-31/GetFunctionConfiguration)
+ [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/lambda-2015-03-31/GetFunctionConfiguration)
+ [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lambda-2015-03-31/GetFunctionConfiguration)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetFunctionConfiguration.md
|
947f25ee6d42-0
|
Retrieves a list of configurations for asynchronous invocation for a function\.
To configure options for asynchronous invocation, use [PutFunctionEventInvokeConfig](API_PutFunctionEventInvokeConfig.md)\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
7f05e29be99f-0
|
```
GET /2019-09-25/functions/FunctionName/event-invoke-config/list?Marker=Marker&MaxItems=MaxItems HTTP/1.1
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
c5dc582df053-0
|
The request uses the following URI parameters\.
** [FunctionName](#API_ListFunctionEventInvokeConfigs_RequestSyntax) ** <a name="SSS-ListFunctionEventInvokeConfigs-request-FunctionName"></a>
The name of the Lambda function\.
**Name formats**
+ **Function name** \- `my-function`\.
+ **Function ARN** \- `arn:aws:lambda:us-west-2:123456789012:function:my-function`\.
+ **Partial ARN** \- `123456789012:function:my-function`\.
The length constraint applies only to the full ARN\. If you specify only the function name, it is limited to 64 characters in length\.
Length Constraints: Minimum length of 1\. Maximum length of 140\.
Pattern: `(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?`
Required: Yes
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
c5dc582df053-1
|
Required: Yes
** [Marker](#API_ListFunctionEventInvokeConfigs_RequestSyntax) ** <a name="SSS-ListFunctionEventInvokeConfigs-request-Marker"></a>
Specify the pagination token that's returned by a previous request to retrieve the next page of results\.
** [MaxItems](#API_ListFunctionEventInvokeConfigs_RequestSyntax) ** <a name="SSS-ListFunctionEventInvokeConfigs-request-MaxItems"></a>
The maximum number of configurations to return\.
Valid Range: Minimum value of 1\. Maximum value of 50\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
33de3231faec-0
|
The request does not have a request body\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
5068478ea1a6-0
|
```
HTTP/1.1 200
Content-type: application/json
{
"FunctionEventInvokeConfigs": [
{
"DestinationConfig": {
"OnFailure": {
"Destination": "string"
},
"OnSuccess": {
"Destination": "string"
}
},
"FunctionArn": "string",
"LastModified": number,
"MaximumEventAgeInSeconds": number,
"MaximumRetryAttempts": number
}
],
"NextMarker": "string"
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
dcc15bf975fd-0
|
If the action is successful, the service sends back an HTTP 200 response\.
The following data is returned in JSON format by the service\.
** [FunctionEventInvokeConfigs](#API_ListFunctionEventInvokeConfigs_ResponseSyntax) ** <a name="SSS-ListFunctionEventInvokeConfigs-response-FunctionEventInvokeConfigs"></a>
A list of configurations\.
Type: Array of [FunctionEventInvokeConfig](API_FunctionEventInvokeConfig.md) objects
** [NextMarker](#API_ListFunctionEventInvokeConfigs_ResponseSyntax) ** <a name="SSS-ListFunctionEventInvokeConfigs-response-NextMarker"></a>
The pagination token that's included if more results are available\.
Type: String
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
03a5dcc9b1fe-0
|
**InvalidParameterValueException**
One of the parameters in the request is invalid\.
HTTP Status Code: 400
**ResourceNotFoundException**
The resource specified in the request does not exist\.
HTTP Status Code: 404
**ServiceException**
The AWS Lambda service encountered an internal error\.
HTTP Status Code: 500
**TooManyRequestsException**
The request throughput limit was exceeded\.
HTTP Status Code: 429
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
ab7b441ea7bb-0
|
For more information about using this API in one of the language\-specific AWS SDKs, see the following:
+ [AWS Command Line Interface](https://docs.aws.amazon.com/goto/aws-cli/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
+ [AWS SDK for \.NET](https://docs.aws.amazon.com/goto/DotNetSDKV3/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
+ [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
+ [AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
+ [AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
+ [AWS SDK for JavaScript](https://docs.aws.amazon.com/goto/AWSJavaScriptSDK/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
ab7b441ea7bb-1
|
+ [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
+ [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
+ [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lambda-2015-03-31/ListFunctionEventInvokeConfigs)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_ListFunctionEventInvokeConfigs.md
|
8cffb45ae31f-0
|
Creates a mapping between an event source and an AWS Lambda function\. Lambda reads items from the event source and triggers the function\.
For details about each event source type, see the following topics\.
+ [Using AWS Lambda with Amazon DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html)
+ [Using AWS Lambda with Amazon Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html)
+ [Using AWS Lambda with Amazon SQS](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html)
+ [Using AWS Lambda with Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html)
The following error handling options are only available for stream sources \(DynamoDB and Kinesis\):
+ `BisectBatchOnFunctionError` \- If the function returns an error, split the batch in two and retry\.
+ `DestinationConfig` \- Send discarded records to an Amazon SQS queue or Amazon SNS topic\.
+ `MaximumRecordAgeInSeconds` \- Discard records older than the specified age\. The default value is infinite \(\-1\)\. When set to infinite \(\-1\), failed records are retried until the record expires
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
8cffb45ae31f-1
|
+ `MaximumRetryAttempts` \- Discard records after the specified number of retries\. The default value is infinite \(\-1\)\. When set to infinite \(\-1\), failed records are retried until the record expires\.
+ `ParallelizationFactor` \- Process multiple batches from each shard concurrently\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
bc26b6bb021a-0
|
```
POST /2015-03-31/event-source-mappings/ HTTP/1.1
Content-type: application/json
{
"BatchSize": number,
"BisectBatchOnFunctionError": boolean,
"DestinationConfig": {
"OnFailure": {
"Destination": "string"
},
"OnSuccess": {
"Destination": "string"
}
},
"Enabled": boolean,
"EventSourceArn": "string",
"FunctionName": "string",
"MaximumBatchingWindowInSeconds": number,
"MaximumRecordAgeInSeconds": number,
"MaximumRetryAttempts": number,
"ParallelizationFactor": number,
"StartingPosition": "string",
"StartingPositionTimestamp": number,
"Topics": [ "string" ]
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
a883106a9021-0
|
The request does not use any URI parameters\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
eee46fd21fce-0
|
The request accepts the following data in JSON format\.
** [BatchSize](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-BatchSize"></a>
The maximum number of items to retrieve in a single batch\.
+ **Amazon Kinesis** \- Default 100\. Max 10,000\.
+ **Amazon DynamoDB Streams** \- Default 100\. Max 1,000\.
+ **Amazon Simple Queue Service** \- Default 10\. Max 10\.
+ **Amazon Managed Streaming for Apache Kafka** \- Default 100\. Max 10,000\.
Type: Integer
Valid Range: Minimum value of 1\. Maximum value of 10000\.
Required: No
** [BisectBatchOnFunctionError](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-BisectBatchOnFunctionError"></a>
\(Streams\) If the function returns an error, split the batch in two and retry\.
Type: Boolean
Required: No
** [DestinationConfig](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-DestinationConfig"></a>
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
eee46fd21fce-1
|
\(Streams\) An Amazon SQS queue or Amazon SNS topic destination for discarded records\.
Type: [DestinationConfig](API_DestinationConfig.md) object
Required: No
** [Enabled](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-Enabled"></a>
If true, the event source mapping is active\. Set to false to pause polling and invocation\.
Type: Boolean
Required: No
** [EventSourceArn](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-EventSourceArn"></a>
The Amazon Resource Name \(ARN\) of the event source\.
+ **Amazon Kinesis** \- The ARN of the data stream or a stream consumer\.
+ **Amazon DynamoDB Streams** \- The ARN of the stream\.
+ **Amazon Simple Queue Service** \- The ARN of the queue\.
+ **Amazon Managed Streaming for Apache Kafka** \- The ARN of the cluster\.
Type: String
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
eee46fd21fce-2
|
+ **Amazon Managed Streaming for Apache Kafka** \- The ARN of the cluster\.
Type: String
Pattern: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)`
Required: Yes
** [FunctionName](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-FunctionName"></a>
The name of the Lambda function\.
**Name formats**
+ **Function name** \- `MyFunction`\.
+ **Function ARN** \- `arn:aws:lambda:us-west-2:123456789012:function:MyFunction`\.
+ **Version or Alias ARN** \- `arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD`\.
+ **Partial ARN** \- `123456789012:function:MyFunction`\.
The length constraint applies only to the full ARN\. If you specify only the function name, it's limited to 64 characters in length\.
Type: String
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
eee46fd21fce-3
|
The length constraint applies only to the full ARN\. If you specify only the function name, it's limited to 64 characters in length\.
Type: String
Length Constraints: Minimum length of 1\. Maximum length of 140\.
Pattern: `(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?`
Required: Yes
** [MaximumBatchingWindowInSeconds](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-MaximumBatchingWindowInSeconds"></a>
\(Streams\) The maximum amount of time to gather records before invoking the function, in seconds\.
Type: Integer
Valid Range: Minimum value of 0\. Maximum value of 300\.
Required: No
** [MaximumRecordAgeInSeconds](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-MaximumRecordAgeInSeconds"></a>
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
eee46fd21fce-4
|
\(Streams\) Discard records older than the specified age\. The default value is infinite \(\-1\)\.
Type: Integer
Valid Range: Minimum value of 60\. Maximum value of 604800\.
Required: No
** [MaximumRetryAttempts](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-MaximumRetryAttempts"></a>
\(Streams\) Discard records after the specified number of retries\. The default value is infinite \(\-1\)\. When set to infinite \(\-1\), failed records will be retried until the record expires\.
Type: Integer
Valid Range: Minimum value of 0\. Maximum value of 10000\.
Required: No
** [ParallelizationFactor](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-ParallelizationFactor"></a>
\(Streams\) The number of batches to process from each shard concurrently\.
Type: Integer
Valid Range: Minimum value of 1\. Maximum value of 10\.
Required: No
** [StartingPosition](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-StartingPosition"></a>
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
eee46fd21fce-5
|
The position in a stream from which to start reading\. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources\. `AT_TIMESTAMP` is only supported for Amazon Kinesis streams\.
Type: String
Valid Values:` TRIM_HORIZON | LATEST | AT_TIMESTAMP`
Required: No
** [StartingPositionTimestamp](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-StartingPositionTimestamp"></a>
With `StartingPosition` set to `AT_TIMESTAMP`, the time from which to start reading, in Unix time seconds\.
Type: Timestamp
Required: No
** [Topics](#API_CreateEventSourceMapping_RequestSyntax) ** <a name="SSS-CreateEventSourceMapping-request-Topics"></a>
\(MSK\) The name of the Kafka topic\.
Type: Array of strings
Array Members: Fixed number of 1 item\.
Length Constraints: Minimum length of 1\. Maximum length of 249\.
Pattern: `^[^.]([a-zA-Z0-9\-_.]+)`
Required: No
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
b01a65ea87c4-0
|
```
HTTP/1.1 202
Content-type: application/json
{
"BatchSize": number,
"BisectBatchOnFunctionError": boolean,
"DestinationConfig": {
"OnFailure": {
"Destination": "string"
},
"OnSuccess": {
"Destination": "string"
}
},
"EventSourceArn": "string",
"FunctionArn": "string",
"LastModified": number,
"LastProcessingResult": "string",
"MaximumBatchingWindowInSeconds": number,
"MaximumRecordAgeInSeconds": number,
"MaximumRetryAttempts": number,
"ParallelizationFactor": number,
"State": "string",
"StateTransitionReason": "string",
"Topics": [ "string" ],
"UUID": "string"
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
9612698fc3fd-0
|
If the action is successful, the service sends back an HTTP 202 response\.
The following data is returned in JSON format by the service\.
** [BatchSize](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-BatchSize"></a>
The maximum number of items to retrieve in a single batch\.
Type: Integer
Valid Range: Minimum value of 1\. Maximum value of 10000\.
** [BisectBatchOnFunctionError](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-BisectBatchOnFunctionError"></a>
\(Streams\) If the function returns an error, split the batch in two and retry\. The default value is false\.
Type: Boolean
** [DestinationConfig](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-DestinationConfig"></a>
\(Streams\) An Amazon SQS queue or Amazon SNS topic destination for discarded records\.
Type: [DestinationConfig](API_DestinationConfig.md) object
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
9612698fc3fd-1
|
Type: [DestinationConfig](API_DestinationConfig.md) object
** [EventSourceArn](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-EventSourceArn"></a>
The Amazon Resource Name \(ARN\) of the event source\.
Type: String
Pattern: `arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\-])+:([a-z]{2}(-gov)?-[a-z]+-\d{1})?:(\d{12})?:(.*)`
** [FunctionArn](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-FunctionArn"></a>
The ARN of the Lambda function\.
Type: String
Pattern: `arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-_]+(:(\$LATEST|[a-zA-Z0-9-_]+))?`
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
9612698fc3fd-2
|
** [LastModified](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-LastModified"></a>
The date that the event source mapping was last updated, or its state changed, in Unix time seconds\.
Type: Timestamp
** [LastProcessingResult](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-LastProcessingResult"></a>
The result of the last AWS Lambda invocation of your Lambda function\.
Type: String
** [MaximumBatchingWindowInSeconds](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-MaximumBatchingWindowInSeconds"></a>
\(Streams\) The maximum amount of time to gather records before invoking the function, in seconds\. The default value is zero\.
Type: Integer
Valid Range: Minimum value of 0\. Maximum value of 300\.
** [MaximumRecordAgeInSeconds](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-MaximumRecordAgeInSeconds"></a>
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
9612698fc3fd-3
|
\(Streams\) Discard records older than the specified age\. The default value is infinite \(\-1\)\. When set to infinite \(\-1\), failed records are retried until the record expires\.
Type: Integer
Valid Range: Minimum value of 60\. Maximum value of 604800\.
** [MaximumRetryAttempts](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-MaximumRetryAttempts"></a>
\(Streams\) Discard records after the specified number of retries\. The default value is infinite \(\-1\)\. When set to infinite \(\-1\), failed records are retried until the record expires\.
Type: Integer
Valid Range: Minimum value of 0\. Maximum value of 10000\.
** [ParallelizationFactor](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-ParallelizationFactor"></a>
\(Streams\) The number of batches to process from each shard concurrently\. The default value is 1\.
Type: Integer
Valid Range: Minimum value of 1\. Maximum value of 10\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
9612698fc3fd-4
|
Type: Integer
Valid Range: Minimum value of 1\. Maximum value of 10\.
** [State](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-State"></a>
The state of the event source mapping\. It can be one of the following: `Creating`, `Enabling`, `Enabled`, `Disabling`, `Disabled`, `Updating`, or `Deleting`\.
Type: String
** [StateTransitionReason](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-StateTransitionReason"></a>
Indicates whether the last change to the event source mapping was made by a user, or by the Lambda service\.
Type: String
** [Topics](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-Topics"></a>
\(MSK\) The name of the Kafka topic\.
Type: Array of strings
Array Members: Fixed number of 1 item\.
Length Constraints: Minimum length of 1\. Maximum length of 249\.
Pattern: `^[^.]([a-zA-Z0-9\-_.]+)`
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
9612698fc3fd-5
|
Pattern: `^[^.]([a-zA-Z0-9\-_.]+)`
** [UUID](#API_CreateEventSourceMapping_ResponseSyntax) ** <a name="SSS-CreateEventSourceMapping-response-UUID"></a>
The identifier of the event source mapping\.
Type: String
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
d5ffe02b16eb-0
|
**InvalidParameterValueException**
One of the parameters in the request is invalid\.
HTTP Status Code: 400
**ResourceConflictException**
The resource already exists, or another operation is in progress\.
HTTP Status Code: 409
**ResourceNotFoundException**
The resource specified in the request does not exist\.
HTTP Status Code: 404
**ServiceException**
The AWS Lambda service encountered an internal error\.
HTTP Status Code: 500
**TooManyRequestsException**
The request throughput limit was exceeded\.
HTTP Status Code: 429
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
71cd951a274a-0
|
For more information about using this API in one of the language\-specific AWS SDKs, see the following:
+ [AWS Command Line Interface](https://docs.aws.amazon.com/goto/aws-cli/lambda-2015-03-31/CreateEventSourceMapping)
+ [AWS SDK for \.NET](https://docs.aws.amazon.com/goto/DotNetSDKV3/lambda-2015-03-31/CreateEventSourceMapping)
+ [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/CreateEventSourceMapping)
+ [AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/CreateEventSourceMapping)
+ [AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/CreateEventSourceMapping)
+ [AWS SDK for JavaScript](https://docs.aws.amazon.com/goto/AWSJavaScriptSDK/lambda-2015-03-31/CreateEventSourceMapping)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
71cd951a274a-1
|
+ [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lambda-2015-03-31/CreateEventSourceMapping)
+ [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/lambda-2015-03-31/CreateEventSourceMapping)
+ [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lambda-2015-03-31/CreateEventSourceMapping)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_CreateEventSourceMapping.md
|
9d56ccb171c1-0
|
Removes a concurrent execution limit from a function\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
5b528362a8ff-0
|
```
DELETE /2017-10-31/functions/FunctionName/concurrency HTTP/1.1
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
65dfd4ad82b3-0
|
The request uses the following URI parameters\.
** [FunctionName](#API_DeleteFunctionConcurrency_RequestSyntax) ** <a name="SSS-DeleteFunctionConcurrency-request-FunctionName"></a>
The name of the Lambda function\.
**Name formats**
+ **Function name** \- `my-function`\.
+ **Function ARN** \- `arn:aws:lambda:us-west-2:123456789012:function:my-function`\.
+ **Partial ARN** \- `123456789012:function:my-function`\.
The length constraint applies only to the full ARN\. If you specify only the function name, it is limited to 64 characters in length\.
Length Constraints: Minimum length of 1\. Maximum length of 140\.
Pattern: `(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?`
Required: Yes
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
bfc1ada0b762-0
|
The request does not have a request body\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
9ee6d546fc3d-0
|
```
HTTP/1.1 204
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
f13bd82cf35d-0
|
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
bbde0970778c-0
|
**InvalidParameterValueException**
One of the parameters in the request is invalid\.
HTTP Status Code: 400
**ResourceConflictException**
The resource already exists, or another operation is in progress\.
HTTP Status Code: 409
**ResourceNotFoundException**
The resource specified in the request does not exist\.
HTTP Status Code: 404
**ServiceException**
The AWS Lambda service encountered an internal error\.
HTTP Status Code: 500
**TooManyRequestsException**
The request throughput limit was exceeded\.
HTTP Status Code: 429
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
6c26f8edc7d1-0
|
For more information about using this API in one of the language\-specific AWS SDKs, see the following:
+ [AWS Command Line Interface](https://docs.aws.amazon.com/goto/aws-cli/lambda-2015-03-31/DeleteFunctionConcurrency)
+ [AWS SDK for \.NET](https://docs.aws.amazon.com/goto/DotNetSDKV3/lambda-2015-03-31/DeleteFunctionConcurrency)
+ [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/DeleteFunctionConcurrency)
+ [AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/DeleteFunctionConcurrency)
+ [AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/DeleteFunctionConcurrency)
+ [AWS SDK for JavaScript](https://docs.aws.amazon.com/goto/AWSJavaScriptSDK/lambda-2015-03-31/DeleteFunctionConcurrency)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
6c26f8edc7d1-1
|
+ [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lambda-2015-03-31/DeleteFunctionConcurrency)
+ [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/lambda-2015-03-31/DeleteFunctionConcurrency)
+ [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lambda-2015-03-31/DeleteFunctionConcurrency)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_DeleteFunctionConcurrency.md
|
9bb5305036b1-0
|
Returns the [resource\-based IAM policy](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) for a function, version, or alias\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
f0443a640de1-0
|
```
GET /2015-03-31/functions/FunctionName/policy?Qualifier=Qualifier HTTP/1.1
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
47e93b8da348-0
|
The request uses the following URI parameters\.
** [FunctionName](#API_GetPolicy_RequestSyntax) ** <a name="SSS-GetPolicy-request-FunctionName"></a>
The name of the Lambda function, version, or alias\.
**Name formats**
+ **Function name** \- `my-function` \(name\-only\), `my-function:v1` \(with alias\)\.
+ **Function ARN** \- `arn:aws:lambda:us-west-2:123456789012:function:my-function`\.
+ **Partial ARN** \- `123456789012:function:my-function`\.
You can append a version number or alias to any of the formats\. The length constraint applies only to the full ARN\. If you specify only the function name, it is limited to 64 characters in length\.
Length Constraints: Minimum length of 1\. Maximum length of 170\.
Pattern: `(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_\.]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?`
Required: Yes
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
47e93b8da348-1
|
Required: Yes
** [Qualifier](#API_GetPolicy_RequestSyntax) ** <a name="SSS-GetPolicy-request-Qualifier"></a>
Specify a version or alias to get the policy for that resource\.
Length Constraints: Minimum length of 1\. Maximum length of 128\.
Pattern: `(|[a-zA-Z0-9$_-]+)`
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
d8a5a4725432-0
|
The request does not have a request body\.
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
9bbd8ab5982b-0
|
```
HTTP/1.1 200
Content-type: application/json
{
"Policy": "string",
"RevisionId": "string"
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
96545e02e420-0
|
If the action is successful, the service sends back an HTTP 200 response\.
The following data is returned in JSON format by the service\.
** [Policy](#API_GetPolicy_ResponseSyntax) ** <a name="SSS-GetPolicy-response-Policy"></a>
The resource\-based policy\.
Type: String
** [RevisionId](#API_GetPolicy_ResponseSyntax) ** <a name="SSS-GetPolicy-response-RevisionId"></a>
A unique identifier for the current revision of the policy\.
Type: String
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
dc57d5bd986b-0
|
**InvalidParameterValueException**
One of the parameters in the request is invalid\.
HTTP Status Code: 400
**ResourceNotFoundException**
The resource specified in the request does not exist\.
HTTP Status Code: 404
**ServiceException**
The AWS Lambda service encountered an internal error\.
HTTP Status Code: 500
**TooManyRequestsException**
The request throughput limit was exceeded\.
HTTP Status Code: 429
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
8cbc7c899a9e-0
|
For more information about using this API in one of the language\-specific AWS SDKs, see the following:
+ [AWS Command Line Interface](https://docs.aws.amazon.com/goto/aws-cli/lambda-2015-03-31/GetPolicy)
+ [AWS SDK for \.NET](https://docs.aws.amazon.com/goto/DotNetSDKV3/lambda-2015-03-31/GetPolicy)
+ [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/GetPolicy)
+ [AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/GetPolicy)
+ [AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/GetPolicy)
+ [AWS SDK for JavaScript](https://docs.aws.amazon.com/goto/AWSJavaScriptSDK/lambda-2015-03-31/GetPolicy)
+ [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lambda-2015-03-31/GetPolicy)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
8cbc7c899a9e-1
|
+ [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/lambda-2015-03-31/GetPolicy)
+ [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lambda-2015-03-31/GetPolicy)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/API_GetPolicy.md
|
a9e3f5252c6d-0
|
A deployment package is a ZIP archive that contains your function code and dependencies\. You need to create a deployment package if you use the Lambda API to manage functions, or if you need to include libraries and dependencies other than the AWS SDK\. You can upload the package directly to Lambda, or you can use an Amazon S3 bucket, and then upload it to Lambda\. If the deployment package is larger than 50 MB, you must use Amazon S3\.
If you use the Lambda [console editor](code-editor.md) to author your function, the console manages the deployment package\. You can use this method as long as you don't need to add any libraries\. You can also use it to update a function that already has libraries in the deployment package, as long as the total size doesn't exceed 3 MB\.
**Note**
You can use the AWS SAM CLI `build` command to create a deployment package for your Python function code and dependencies\. The AWS SAM CLI also provides an option to build your deployment package inside a Docker image that is compatible with the Lambda execution environment\. See [Building applications with dependencies](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build.html) in the AWS SAM Developer Guide for instructions\.
**Topics**
+ [Prerequisites](#python-package-prereqs)
+ [Updating a function with no dependencies](#python-package-codeonly)
+ [Updating a function with additional dependencies](#python-package-dependencies)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
a9e3f5252c6d-1
|
+ [Updating a function with additional dependencies](#python-package-dependencies)
+ [With a virtual environment](#python-package-venv)
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
986eac02a582-0
|
These instructions assume that you already have a function\. If you haven't created a function yet, see [Building Lambda functions with Python](lambda-python.md)\.
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/python-package.md
|
1f69d1effabd-0
|
To create or update a function with the Lambda API, create an archive that contains your function code and upload it with the AWS CLI\.
**To update a Python function with no dependencies**
1. Create a ZIP archive\.
```
~/my-function$ zip function.zip lambda_function.py
adding: lambda_function.py (deflated 17%)
```
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": 815,
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
1f69d1effabd-1
|
"Handler": "lambda_function.lambda_handler",
"CodeSize": 815,
"CodeSha256": "GcZ05oeHoJi61VpQj7vCLPs8DwCXmX5sE/fE2IHsizc=",
"Version": "$LATEST",
"RevisionId": "d1e983e3-ca8e-434b-8dc1-7add83d72ebd",
...
}
```
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
a79b644c7b0d-0
|
If your function depends on libraries other than the SDK for Python \(Boto3\), install them to a local directory with [pip](https://pypi.org/project/pip/), and include them in your deployment package\.
**Note**
For libraries that use extension modules written in C or C\+\+, build your deployment package in an Amazon Linux environment\. You can use the [SAM CLI build command](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build.html), which uses Docker, or build your deployment package on Amazon EC2 or AWS CodeBuild\.
The following example shows how to create a deployment package that includes a common graphics library named Pillow\.
**To update a Python function with dependencies**
1. Install libraries in a new, project\-local `package` directory with `pip`'s `--target` option\.
```
~/my-function$ pip install --target ./package 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
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
a79b644c7b0d-1
|
Installing collected packages: Pillow
Successfully installed Pillow-5.3.0
```
**Note**
In order for `--target` to work on [Debian\-based systems](https://github.com/pypa/pip/issues/3826) like Ubuntu, you may also need to pass the `--system` flag to prevent `distutils` errors\.
1. Create a ZIP archive of the dependencies\.
```
~/my-function$ cd package
~/my-function/package$ zip -r9 ${OLDPWD}/function.zip .
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%)
adding: PIL/.libs/liblcms2-a6801db4.so.2.0.8 (deflated 67%)
...
```
1. Add your function code to the archive\.
```
~/my-function/package$ cd $OLDPWD
~/my-function$ zip -g function.zip lambda_function.py
|
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-lambda-developer-guide/doc_source/python-package.md
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.