AWS – Lambda Hands On

To start a new lambda function follow the instructions below:

On the dashboard in the search bar search for AWS lambda and then click on lambda

You will see a dashboard on that dashboard click on create function.

You will see some options on how to…

To start a new lambda function follow the instructions below:

  • On the dashboard in the search bar search for AWS lambda and then click on lambda
    Lambda search

  • You will see a dashboard on that dashboard click on create function.
    alt text

  • You will see some options on how to create a function. Use the option to Use a blueprint
    alt text

  • In the search type hello world and select the hello-world-python option.
    alt text

  • The screen will appear like this and select it and click configure
    alt text

  • Give a function name and let the execution role remain the same because we don’t want to use this function to access other services.
    alt text

  • Click on create function
    alt text

  • You wills see a first function with a code editor
    alt text

  • Click on test in the editor. And give it an event name
    alt text

  • Click on create after that click on test again
    alt text

As you can see in the logs there is our event name and response as expected from the function as its returning key1 and details of all the computation used

  • We have deployed our first lambda function. Now let us see how to change the lambda function.

  • In the new function uncomment the
    raise Exception('Something went wrong') line and comment out return event['key1'] # Echo back the first key value and click on deploy
    alt text

  • Click on test again and we will see that an exception occurred and it fails.
    alt text

  • If you want to change the configuration of this function you can do this in the configuration tab
    alt text

  • After that click on edit now you can change the memory timeout as you require for this function
    alt text

Let me know if anyone has any questions


Print Share Comment Cite Upload Translate
APA
Ajit Singh | Sciencx (2024-03-29T01:55:46+00:00) » AWS – Lambda Hands On. Retrieved from https://www.scien.cx/2021/09/01/aws-lambda-hands-on/.
MLA
" » AWS – Lambda Hands On." Ajit Singh | Sciencx - Wednesday September 1, 2021, https://www.scien.cx/2021/09/01/aws-lambda-hands-on/
HARVARD
Ajit Singh | Sciencx Wednesday September 1, 2021 » AWS – Lambda Hands On., viewed 2024-03-29T01:55:46+00:00,<https://www.scien.cx/2021/09/01/aws-lambda-hands-on/>
VANCOUVER
Ajit Singh | Sciencx - » AWS – Lambda Hands On. [Internet]. [Accessed 2024-03-29T01:55:46+00:00]. Available from: https://www.scien.cx/2021/09/01/aws-lambda-hands-on/
CHICAGO
" » AWS – Lambda Hands On." Ajit Singh | Sciencx - Accessed 2024-03-29T01:55:46+00:00. https://www.scien.cx/2021/09/01/aws-lambda-hands-on/
IEEE
" » AWS – Lambda Hands On." Ajit Singh | Sciencx [Online]. Available: https://www.scien.cx/2021/09/01/aws-lambda-hands-on/. [Accessed: 2024-03-29T01:55:46+00:00]
rf:citation
» AWS – Lambda Hands On | Ajit Singh | Sciencx | https://www.scien.cx/2021/09/01/aws-lambda-hands-on/ | 2024-03-29T01:55:46+00:00
https://github.com/addpipe/simple-recorderjs-demo