You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides limits of code size and concurrency associated with the current account and region\.For more information or to request a limit increase for concurrent executions, see [Lambda Limits](https://docs.aws.amazon.com/lambda/latest/dg/limits.html)\.
3
+
Limits that are related to concurrency and code storage\.All file and storage sizes are in bytes\.
Size, in bytes, of code/dependencies that you can zip into a deployment package \(uncompressed zip/jar size\) for uploading\. The default limit is 250 MB\.
8
+
The maximum size of your function's code and layers when they're extracted\.
Size, in bytes, of a single zipped code/dependencies package you can upload for your Lambda function\(\.zip/\.jar file\)\. Try using Amazon S3 for uploading larger files\. Default limit is 50 MB\.
13
+
The maximum size of a deployment package when it's uploaded directly to AWS Lambda\. Use Amazon S3 for larger files\.
The number of concurrent executions available to functions that do not have concurrency limits set\. For more information, see [Managing Concurrency](https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html)\.
28
+
The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with [PutFunctionConcurrency](API_PutFunctionConcurrency.md)\.
29
29
Type: Integer
30
30
Valid Range: Minimum value of 0\.
31
31
Required: No
@@ -35,5 +35,6 @@ Required: No
35
35
For more information about using this API in one of the language\-specific AWS SDKs, see the following:
36
36
+[AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/AccountLimit)
37
37
+[AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/AccountLimit)
38
+
+[AWS SDK for Go \- Pilot](https://docs.aws.amazon.com/goto/SdkForGoPilot/lambda-2015-03-31/AccountLimit)
38
39
+[AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/AccountLimit)
39
40
+[AWS SDK for Ruby V2](https://docs.aws.amazon.com/goto/SdkForRubyV2/lambda-2015-03-31/AccountLimit)
Adds permissions to the resource\-based policy of a version of a function layer\. Use this action to grant layer usage permission to other accounts\. You can grant permission to a single account, all AWS accounts, or all accounts in an organization\.
3
+
Adds permissions to the resource\-based policy of a version of an [AWS Lambda layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)\. Use this action to grant layer usage permission to other accounts\. You can grant permission to a single account, all AWS accounts, or all accounts in an organization\.
4
4
5
5
To revoke permission, call [RemoveLayerVersionPermission](API_RemoveLayerVersionPermission.md) with the statement ID that you specified when you added it\.
6
6
@@ -23,7 +23,7 @@ Content-type: application/json
23
23
The request requires the following URI parameters\.
Copy file name to clipboardExpand all lines: doc_source/API_AddPermission.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# AddPermission<aname="API_AddPermission"></a>
2
2
3
-
Adds a permission to the resource policy associated with the specified AWS Lambda function\. You use resource policies to grant permissions to event sources that use the *push* model\. In a *push* model, event sources \(such as Amazon S3 and custom applications\) invoke your Lambda function\. Each permission you add to the resource policy allows an event source permission to invoke the Lambda function\.
3
+
Grants an AWS service or another account permission to use a function\. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias\. If you use a qualifier, the invoker must use the full Amazon Resource Name \(ARN\) of that version or alias to invoke the function\.
4
4
5
-
Permissions apply to the Amazon Resource Name \(ARN\) used to invoke the function, which can be unqualified \(the unpublished version of the function\), or include a version or alias\.If a client uses a version or alias to invoke a function, use the `Qualifier` parameter to apply permissions to that ARN\. For more information about versioning, see [AWS Lambda Function Versioning and Aliases](https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)\.
5
+
To grant permission to another account, specify the account ID as the `Principal`\. For AWS services, the principal is a domain\-style identifier defined by the service, like `s3.amazonaws.com`or `sns.amazonaws.com`\.For AWS services, you can also specify the ARN or owning account of the associated resource as the `SourceArn` or `SourceAccount`\. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function\.
6
6
7
-
This operation requires permission for the `lambda:AddPermission` action\.
7
+
This action adds a statement to a resource\-based permission policy for the function\. For more information about function policies, see [Lambda Function Policies](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html)\.
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\.
38
38
Length Constraints: Minimum length of 1\. Maximum length of 140\.
The AWS Lambda action you want to allow in this statement\. Each Lambda action is a string starting with `lambda:` followed by the API name \(see [Actions](https://docs.aws.amazon.com/lambda/latest/dg/API_Operations.html)\)\.For example, `lambda:CreateFunction`\. You can use wildcard \(`lambda:*`\) to grant permission for all AWS Lambda actions\.
51
+
The action that the principal can use on the function\.For example, `lambda:InvokeFunction` or `lambda:GetFunction`\.
The principal who is getting this permission\. The principal can be an AWS service \(e\.g\.`s3.amazonaws.com`or `sns.amazonaws.com`\) for service triggers, or an account ID for cross\-account access\. If you specify a service as a principal, use the `SourceArn`parameter to limit who can invoke the function through that service\.
64
+
The AWS service or account that invokes the function\. If you specify a service, use `SourceArn`or `SourceAccount` to limit who can invoke the function through that service\.
An optional value you can use to ensure you are updating the latest update of the function version or alias\.If the `RevisionID` you pass doesn't match the latest `RevisionId` of the function or alias, it will fail with an error message, advising you to retrieve the latest function version or alias `RevisionID` using either [GetFunction](API_GetFunction.md) or [GetAlias](API_GetAlias.md)
70
+
Only update the policy if the revision ID matches the ID that's specified\.Use this option to avoid modifying a policy that has changed since you last read it\.
This parameter is used for S3 and SES\. The AWS account ID \(without a hyphen\) of the source owner\.For example, if the`SourceArn`identifies a bucket, then this is the bucket owner's account ID\. You can use this additional condition to ensure the bucket you specify is owned by a specific account \(it is possible the bucket owner deleted the bucket and some other AWS account created the bucket\)\. You can also use this condition to specify all sources \(that is, you don't specify the `SourceArn`\) owned by a specific account\.
75
+
For AWS services, the ID of the account that owns the resource\.Use this instead of`SourceArn`to grant permission to resources that are owned by another account \(for example, all of an account's Amazon S3 buckets\)\. Or use it together with `SourceArn` to ensure that the resource is owned by the specified account\. For example, an Amazon S3 bucket could be deleted by its owner and recreated by another account\.
If you add a permission to a service principal without providing the source ARN, any AWS account that creates a mapping to your function ARN can invoke your Lambda function\.
81
+
For AWS services, the ARN of the AWS resource that invokes the function\. For example, an Amazon S3 bucket or Amazon SNS topic\.
The permission statement you specified in the request\. The response returns the same as a string using a backslash \("\\"\) as an escape character in the JSON\.
111
+
The permission statement that's added to the function policy\.
113
112
Type: String
114
113
115
114
## Errors<aname="API_AddPermission_Errors"></a>
@@ -119,7 +118,7 @@ One of the parameters in the request is invalid\. For example, if you provided a
119
118
HTTP Status Code: 400
120
119
121
120
**PolicyLengthExceededException**
122
-
Lambda function access policy is limited to 20 KB\.
121
+
The permissions policy for the resource is too large\.[Learn more](https://docs.aws.amazon.com/lambda/latest/dg/limits.html)
123
122
HTTP Status Code: 400
124
123
125
124
**PreconditionFailedException**
@@ -139,7 +138,7 @@ The AWS Lambda service encountered an internal error\.
139
138
HTTP Status Code: 500
140
139
141
140
**TooManyRequestsException**
142
-
Request throughput limit exceeded
141
+
Request throughput limit exceeded\.
143
142
HTTP Status Code: 429
144
143
145
144
## See Also<aname="API_AddPermission_SeeAlso"></a>
@@ -149,6 +148,7 @@ For more information about using this API in one of the language\-specific AWS S
149
148
+[AWS SDK for \.NET](https://docs.aws.amazon.com/goto/DotNetSDKV3/lambda-2015-03-31/AddPermission)
150
149
+[AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/lambda-2015-03-31/AddPermission)
151
150
+[AWS SDK for Go](https://docs.aws.amazon.com/goto/SdkForGoV1/lambda-2015-03-31/AddPermission)
151
+
+[AWS SDK for Go \- Pilot](https://docs.aws.amazon.com/goto/SdkForGoPilot/lambda-2015-03-31/AddPermission)
152
152
+[AWS SDK for Java](https://docs.aws.amazon.com/goto/SdkForJava/lambda-2015-03-31/AddPermission)
153
153
+[AWS SDK for JavaScript](https://docs.aws.amazon.com/goto/AWSJavaScriptSDK/lambda-2015-03-31/AddPermission)
154
154
+[AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lambda-2015-03-31/AddPermission)
0 commit comments