title | platform |
---|---|
About the aws_lambdas Resource |
aws |
Use the aws_lambdas
resource to test the collection of lambdas deployed into an account.
describe aws_lambdas do
its('count') { should eq 20 }
end
This resource does not expect any parameters.
Property | Description |
---|---|
names | The names of the lambda deployed. |
tags | The tags of the lambda deployed. |
lambdas = aws_lambdas()
describe lambdas do
its ('count') { should eq 33}
end
lambdas.tags.each_with_index { | tag, i |
if tag!= {} and tag.include? 'Application' and tag['Application']=='test')
lambda_name = lambdas.names[i]
describe aws_lambda(lambda_name) do
it { should exist}
its ('handler') { should eq 'main.on_event'}
its ('version') { should eq '$LATEST' }
its ('runtime') { should eq 'python3.7' }
end
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:ListFunctions
action with Effect set to Allow.
You can find detailed documentation at AWS Lambda