Method: Aws::Lambda::Client#add_permission
- Defined in:
- lib/aws-sdk-lambda/client.rb
#add_permission(params = {}) ⇒ Types::AddPermissionResponse
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 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.
For information about the push model, see [Lambda Functions].
If you are using versioning, the permissions you add 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].
This operation requires permission for the ‘lambda:AddPermission` action.
[1]: docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html [2]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
307 308 309 310 |
# File 'lib/aws-sdk-lambda/client.rb', line 307 def (params = {}, = {}) req = build_request(:add_permission, params) req.send_request() end |