I'm trying to get into the whole IAM setup. I have a role that I want a lambda to be able to assume. So, I have my Trust Relationship policy setup like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
Now, as far as I understand, this would allow any lambda to assume this role.
Can I narrow this in a bit more, so it's only one specific lambda, that is allowed to assume it?
I've tried to replace "Service": "lambda.amazonaws.com" with the arn of the lambda, but it didn't really work out for me :/
"Resource": <Lambda ARN>under Action