Adds permissions to the resource-based policy of a version of an Lambda
layer. Use this action to grant layer
usage permission to other accounts. You can grant permission to a single account, all accounts in an organization,
or all Amazon Web Services accounts.
To revoke permission, call RemoveLayerVersionPermission with the statement ID that you
specified when you added it.
Example
Use a bare-bones client and the command you need to make an API call.
The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the GetFunction or the GetAlias
API operation to retrieve the latest RevisionId for your resource.
Adds permissions to the resource-based policy of a version of an Lambda layer. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all accounts in an organization, or all Amazon Web Services accounts.
To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you added it.
Example
Use a bare-bones client and the command you need to make an API call.
Param
AddLayerVersionPermissionCommandInput
Returns
AddLayerVersionPermissionCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidParameterValueException (client fault)
One of the parameters in the request is not valid.
Throws
PolicyLengthExceededException (client fault)
The permissions policy for the resource is too large. For more information, see Lambda quotas.
Throws
PreconditionFailedException (client fault)
The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the
GetFunction
or theGetAlias
API operation to retrieve the latest RevisionId for your resource.Throws
ResourceConflictException (client fault)
The resource already exists, or another operation is in progress.
Throws
ResourceNotFoundException (client fault)
The resource specified in the request does not exist.
Throws
ServiceException (server fault)
The Lambda service encountered an internal error.
Throws
TooManyRequestsException (client fault)
The request throughput limit was exceeded. For more information, see Lambda quotas.
Throws
LambdaServiceException
Base exception class for all service exceptions from Lambda service.