Create IAM role

On the AWS Console page, click on the IAM link under the Security, Identity & Compliance section (or search for IAM).

On the IAM Page, click on the Roles menu item in the left.

On the roles page, click on the Create role button.

On the next screen, select Lambda as the service which will use this role and then click on the Next: Permissions button.

Create role

On the filter policies search, type LambdaBasic and select the AWSLambdaBasicExecutionRole policy. Also, type S3Full at the search field and select the AmazonS3FullAccess policy. Click on Next: Review button.

Create role

Create role

On the Review page name your role as ImageResizeLambdaRole, make sure you seeing the two policies added on the step above and click on the Create Role button.

Create role