AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the RemovePermission operation. You can remove individual permissions from an resource policy associated with a Lambda function by providing a statement ID that you provided when you added the permission.

If you are using versioning, the permissions you remove are specific to the Lambda function version or alias you specify in the AddPermission request via the Qualifier parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases.

Note that removal of a permission will cause an active event source to lose permission to the function.

You need permission for the lambda:RemovePermission action.

Inheritance Hierarchy


Namespace: Amazon.Lambda.Model
Assembly: AWSSDK.Lambda.dll
Version: 3.x.y.z


public class RemovePermissionRequest : AmazonLambdaRequest

The RemovePermissionRequest type exposes the following members


Public Method RemovePermissionRequest()


Public Property FunctionName System.String

Gets and sets the property FunctionName.

Lambda function whose resource policy you want to remove a permission from.

You can specify a function name (for example, Thumbnail) or you can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.

Public Property Qualifier System.String

Gets and sets the property Qualifier.

You can specify this optional parameter to remove permission associated with a specific function version or function alias. If you don't specify this parameter, the API removes permission associated with the unqualified function ARN.

Public Property RevisionId System.String

Gets and sets the property RevisionId.

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 or .

Public Property StatementId System.String

Gets and sets the property StatementId.

Statement ID of the permission to remove.


This operation removes a Lambda function's permissions

To remove a Lambda function's permissions

var response = client.RemovePermission(new RemovePermissionRequest 
    FunctionName = "myFunction",
    Qualifier = "1",
    StatementId = "role-statement-id"


Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone