AWS tutorial
Firstly we will need to go to Lambda then create function.
In function name call it what you like. For me I followed this tutorial off whizlabs so I used theirs. Run time click on the drop down and enter python 3.8
Change the execution role to create a new role with AWS policy templates.
Enter your role new with API. Then choose Basic Lambda@edge permissions (for cloudfront trigger)
Then hit create!
Well done so far. Now we need to create the API. So on the console, go to API gateway, then build.

It will then give you an option of the types of API. We'll choose RestAPI, the third option, not the VPC, that's not needed for this tutorial.
So now we need to create the resource. Click actions then create resource.
Type in the resource name, then click create resource.
That's great, we have resource but what action does it take, and how? This is where we create a method. So once again click action. We will put in the name and use a GET method, then click create.
Once you have done these stages, you're nearly there. So lets click on Deploy API
In the deployment stage enter new, then enter the stage name, we're testing, so put testing API, and enter a brief description and deploy.
Final stage we need to invoke the URL and make sure the API is connecting to Lamda.

Click the link. Which will take you to a browser. You need to /whizlabsapi to test that it has validated. If it has it should look like the picture below.

Status 200 code, which means it sucessfully been created and a little texed from Lambda to.
That's all she wrote, hoped you found this tutorial helpful.
Happy clouding.


