title | platform |
---|---|
About the aws_lambda Resource |
aws |
Use the aws_lambda
resource to test a specific lambda.
describe aws_lambda 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 function.
All properties as defined by the Aws::lambda::Types::GetFunctionResponse
describe aws_lambda('my_new_lambda') 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:GetFunction
action with Effect set to Allow.
You can find detailed documentation at AWS Lambda