From the course: AWS Essential Training for Developers

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Create a Lambda function

Create a Lambda function

- [Instructor] You can find Lambda in the AWS console by clicking on the Services search bar and typing in, yep, you got it, Lambda. Click Create a function. Select Use a blueprint, and in the blueprint name pull-down, search for S3 and click on the Get S3 object that's a Python function. For Function Name, type lamdareads3. Lambda functions can use IAM roles, just like EC2 instances. You have to grant access to Lambda for it to control other AWS services for you. Select the option Create a new role from AWS policy templates. For the role name, type lambdas3readonly. Click on Policy templates and take a look at some of the sample policies you can apply to this new IAM role. If your Lambda's going to interact with any other AWS services, such as simple email service for sending out an email, you can add these policies here or customize your own from the IAM role console. Lambda functions run in response to an event…

Contents