Snowcrash
Snowcrash

Reputation: 86267

What's the default IAM permissions for a Lambda ARN?

Assuming you create a Lambda ARN and Publish it, what are the default IAM permissions for that Lambda ARN?

i.e. can anyone go ahead and use it if they have the ARN?

Upvotes: 0

Views: 300

Answers (1)

K Mo
K Mo

Reputation: 2155

When you create a lambda, you have to assign an IAM role to it. There are no predefined roles, although there are some predefined policies that you can assign to a role. As a minimum you would want to allow it to write logs to CloudWatch. If you wanted the lambda to access an S3 bucket, that policy would need to be assigned to the role.

The role you assign to a Lambda only defines what that Lambda can do, not what can invoke it. You can assign triggers for other AWS services to invoke the Lambda, but you can't say set a policy in the lambda role or trigger that would allow anything to invoke it.

If you wanted to invoke the lambda directly (e.g. though an SDK), you would need an IAM role that had permission to invoke that lambda.

The ARN (Amazon Resource Name) is just a naming convention that AWS uses to find something.

Upvotes: 1

Related Questions