Ресурс aws_lambda
Используйте ресурс aws_lambda для проверки конкретной 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
Параметры
Этот ресурс ожидает имя функции.
Свойства
Все свойства, как определено в Aws::lambda::Types::GetFunctionResponse
Примеры
проверка правильности развертывания всех lambda-функций с определённым тегом
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
Сопоставители
Этот ресурс аудита InSpec использует стандартные сопоставители. Полный список доступных сопоставителей можно найти на нашей странице сопоставителей.
Разрешения AWS
Вашему Принципалу потребуется действие lambda:GetFunction с параметром Effect, установленным в значение Allow.
Подробную документацию можно найти на странице AWS Lambda
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/aws_lambda/