AWS Lambda Console¶
In this lecture we are going to deploy our first AWS Lambda Function. We are going to do this through the AWS Console, later we'll move on to the serverless framework.
Deploying Hello World Function Using AWS Lambda¶
- Sign Up for an AWS Account
- Create our first lambda function
- Test and run it
Creating our Lambda¶
We can access lambda by searching it in the AWS Console.
There we can click on Create Function
.
There we can choose from different types of lambda functions: - Author from scratch - Start with a simple hello world example and change it - Use a blueprint - Build a lambda application from sample code and configuration presets for common use cases - Container Image - Select a container image to deploy for your function - Browse serverless app repository - Deploy a sample lambda application from the AWS Serverless Application Repository
We are going to use the hello-world-python
blueprint.
In the next step we are going to just enter the function name as hello-world-python
and leave everything else as-is.
Once that's done, our function is successfully created.
In this window we can configure the triggers, destinations for the lambda as well as change the code itself.
Currently, we are going to test it manually.
In the configuration tab we can set things like Permissions, Environment Variables and all kinds of settings.
At the bottom we can change the runtime settings, where we can choose the runtime environment, the handler (which method is called) and the architecture.
Testing the Lambda¶
We can go to the Test
tab and we'll see a screen to configure a new event.
We can click the save changes and test.
It should succeed:
Deleting Lambda¶
We can delete the function by clicking Action
and then choosing the delete.