In this video, you’ll learn how to return HTML content from an AWS Lambda function.
—
Facebook:
—
Video Transcript:
_
Hi guys, this is Abhi from Gokcedb. In this video, you are going to learn how to return HTML content from AWS Lambda Function. Let’s start by searching for Lambda on the AWS Console, then click on the function in the left menu followed by create function.
Give your function a name and run time. I’m going to select Phyton and leave everything else to default. Hit create function then navigate to the Code Source section.
Here I am going to paste HTML code for a form in an HTML Variable. I am also going to plug in the HTML Variable in my return body. Hit deploy, then click on the Test button.
Give your Test Event a name then hit save and then click on test again. Looks like our Lambda Function is working as expected. Now click on the Configuration tab then select the function URL from the left menu.
Hit the Create Function URL button and the Auth type. I am going to select none and then hit save. If you click on the Function URL, you’ll see that your HTML code is being returned text.
To fix this, go back to the Code Source section, and add headers to the return data structure with the content type of text, slash HTML. Hit deploy and go back to the function URL.
Refresh the webpage and now you should see the HTML form being redone. There you have it. Make sure you like, subscribe, and turn on the notification bell. Until next time….(read more)
Convert Word 2 PDF: Word to PDF Converter
Convert PowerPoint 2 PDF: PPT to PDF Converter
Convert Excel 2 PDF: Excel to PDF Converter
Convert an Image 2 PDF: Image to PDF Converter
Convert HTML 2 PDF: HTML to PDF Converter
More Tools: PDF Converter
very good and very objective. congrats and thanks!
very informative video
thankyou sir
The fact that you start talking about the main topic in like 3 secs just makes me like your videos
Am always following you teacher
Wow