AWS S3 and Python Lambda with an API Gateway for a simple web form
In this video we create a static web bucket in Amazon S3. I also create a Lambda with an API gateway to process the a form in that s3 bucket. We also looked at cloudwatch to understand out errors better.
My lambda python code
import json
def lambda_handler(event, context):
#myuser = event['queryStringParameters']['user']
return {
'statusCode': 200,
'body': json.dumps(event["queryStringParameters"])
}
Sample form page - will not be up forever https://mywebsitebucket2day.s3.amazonaws.com/form.html
Sample PHP to process form page - Once again this will not be up forever https://mywebsitebucket2day.s3.amazonaws.com/form.php
Live form working - Will not be up forever https://mywebsitebucket2day.s3.amazonaws.com/formv2.html