Lambda / Client / remove_layer_version_permission

remove_layer_version_permission#

Lambda.Client.remove_layer_version_permission(**kwargs)#

Removes a statement from the permissions policy for a version of an Lambda layer. For more information, see AddLayerVersionPermission.

See also: AWS API Documentation

Request Syntax

response = client.remove_layer_version_permission(
    LayerName='string',
    VersionNumber=123,
    StatementId='string',
    RevisionId='string'
)
Parameters:
  • LayerName (string) –

    [REQUIRED]

    The name or Amazon Resource Name (ARN) of the layer.

  • VersionNumber (integer) –

    [REQUIRED]

    The version number.

  • StatementId (string) –

    [REQUIRED]

    The identifier that was specified when the statement was added.

  • RevisionId (string) – Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.

Returns:

None

Exceptions

  • Lambda.Client.exceptions.ServiceException

  • Lambda.Client.exceptions.ResourceNotFoundException

  • Lambda.Client.exceptions.InvalidParameterValueException

  • Lambda.Client.exceptions.TooManyRequestsException

  • Lambda.Client.exceptions.PreconditionFailedException

Examples

The following example deletes permission for an account to configure a layer version.

response = client.remove_layer_version_permission(
    LayerName='my-layer',
    StatementId='xaccount',
    VersionNumber=1,
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}