Securing AWS Lambda using IAM
In an earlier section, when creating a Lambda function using the console, we talked about creating an IAM role and assigning permissions to the role so that it has access to different AWS resources; let's look at that in detail now.
AWS IAM is a service that helps you securely control access to different AWS services. With IAM, you can control who is authenticated and who is authorized to access the resources. IAM helps controlling access to AWS Services in the following ways.
Authenticating
You can access AWS resources by using these types of identities:
- AWS account root user
- IAM Users
- IAM Roles
For our discussion, I will focus on IAM Roles, as that is what AWS Lambda uses to authenticate against different AWS services. An IAM role is an IAM identity that you can create in an AWS account with specific permissions, but that doesn't need to be associated with any specific person. With an IAM role, you can obtain temporary credentials to access different AWS services...