title | platform |
---|---|
About the aws_lambda Resource |
aws |
Use the aws_lambda
resource to test a specific AWS Lambda function.
describe aws_lambda('LAMBDA_FUNCTION') do
it { should exist}
its ('handler') { should eq 'main.on_event'}
its ('version') { should eq '$LATEST' }
its ('runtime') { should eq 'python3.7' }
end
This resource expects the name of the AWS Lambda function.
This resource can test all properties defined by the Aws::lambda::Types::GetFunctionResponse class.
describe aws_lambda('LAMBDA_FUNCTION') do
it { should exist}
its ('handler') { should eq 'main.on_event'}
its ('version') { should eq '$LATEST' }
its ('runtime') { should eq 'python3.7' }
end
This InSpec audit resource uses the standard matchers. For a full list of available matchers, please visit our matchers page.
Your Principal will need the Lambda:Client:GetFunctionResponse
action with Effect
set to Allow
.
You can find detailed documentation at AWS Lambda