AWS Lambda
Developer Guide

Step 2.2: Create the Execution Role (IAM Role)

In this section, you create an IAM role using the following predefined role type and access policy:

  • AWS service role of the type AWS Lambda – This role grants AWS Lambda permissions to assume the role.

  • AWSLambdaBasicExecutionRole – This is the access permissions policy that you attach to the role.

For more information about IAM roles, see IAM Roles in the IAM User Guide. Use the following procedure to create the IAM role.

To create an IAM role (execution role)

  1. Sign in to the AWS Management Console and open the IAM console at

  2. Follow the steps in Creating a Role to Delegate Permissions to an AWS Service in the IAM User Guide to create an IAM role (execution role). As you follow the steps to create a role, note the following:

    • In Role Name, use a name that is unique within your AWS account (for example, lambda-sns-execution-role).

    • In Select Role Type, choose AWS Service Roles, and then choose AWS Lambda. This grants the AWS Lambda service permissions to assume the role.

    • In Attach Policy, choose AWSLambdaBasicExecutionRole. The permissions in this policy are sufficient for the Lambda function in this tutorial.

  3. Write down the role ARN. You will need it in the next step when you create your Lambda function.