I don’t haveiamrolestatements
property in my serverless.yml. But I am seeing that sls deploy
is auto-creating an IAM role for my Lambda functions. The permissions that the role has are:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:CreateLogStream"
],
"Resource": [
"arn:aws:logs:us-west-2:<acc id>:log-group:/aws/lambda/servicename-stage-functionname:*"
],
"Effect": "Allow"
},
{
"Action": [
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:us-west-2:<acc id>:log-group:/aws/lambda/servicename-stage-functionname:*"
],
"Effect": "Allow"
}
]
}
I wonder how is this so ? Why is the role getting auto created?