 aws_lambda resource   [edit on GitHub]  Use the aws_lambda resource to test a specific lambda. Syntax 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

Parameters This resource expects the name of the function. Properties All properties as defined by the Aws8b7c:f320:99b9:690f:4595:cd17:293a:c069lam8b7c:f320:99b9:690f:4595:cd17:293a:c069Types8b7c:f320:99b9:690f:4595:cd17:293a:c069GetFunctionResponse Examples tests that all lambdas with a particular tag is correctly deployed 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

Matchers This InSpec audit resource uses the standard matchers. For a full list of available matchers, please visit our matchers page. AWS Permissions Your Principal will need the lambda:GetFunction action with Effect set to Allow. You can find detailed documentation at AWS Lambda  

    
{'path': 'public/docs/chef~18/inspec/resources/aws_lambda/index.html', 'source': 'DevDocs.IO'}