Skip to main content

aws_lambda_permissions Resource

Use the aws_lambda_permissions InSpec audit resource to test properties of multiple AWS Lambda permissions.

The AWS::Lambda::Permission resource 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.

For additional information, including details on parameters and properties, see the AWS documentation on AWS Lambda permission.


This resource is available in the Chef InSpec AWS resource pack.

See the Chef InSpec documentation on cloud platforms for information on configuring your AWS environment for InSpec and creating an InSpec profile that uses the InSpec AWS resource pack.


Ensure that permission has the desired statement id.

describe aws_lambda_permission(function_name: 'LAMBDA_FUNCTION_NAME') do
  its('sids') { should include 'STATEMENT_ID' }


function_name (required)


The statement ID of the function.
The effect of the function.
The AWS services or accounts that invokes the function.
The action of the function.
The resource ARNs of the function..


Ensure a statement ID is available.

describe aws_lambda_permission(function_name: 'LAMBDA_FUNCTION_NAME') do
  its('sids') { should include 'STATEMENT_ID' }

Ensure an effect is available.

describe aws_lambda_permission(function_name: 'LAMBDA_FUNCTION_NAME') do
    its('effects') { should include 'Allow' }


This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.

The controls will pass if the get method returns at least one result.

AWS Permissions

Your Principal will need the Lambda:Client:GetPolicyResponse action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!


Search Results