aws lambda and accesing aws rds - clouddictive
TRANSCRIPT
AWS Lambda and RDS
Clouddictivehttps://[email protected]
Agenda❖ What is Serverless Compute❖ Benefits of Serverless Compute❖ AWS Lambda❖ How It Works❖ RDS❖ Employee Service❖ Setup RDS❖ Setup maven project❖ Create and Test lambda function – Demo❖ Resources
Serverless Compute❖ Next step in the evolution of Cloud Computing❖ Capability to run your code or a function in the
cloud without the need to manage any server in the cloud.
❖ Big Players ❖ Amazon - AWS Lambda❖ Google - Google Cloud Function❖ Microsoft - Azure Functions
Benefits of Serverless Compute❖ No servers to administer
❖ No Need Maintain and Manage Server - applying updates
❖ Pay for only code execution❖ No charge when the code is not running
❖ Automatic Scaling
AWS Lamba❖ Function in the Cloud❖ Automatic Scaling❖ Pay as you go
❖ Pricing – 1M requests for free and then $0.20/1m requests.❖ Supported languages – Java, Python, and JavaScript❖ Deployment – direct zip uploads lambda or from S3.❖ Event Driven – Different source can trigger your function.❖ RESTful invocation capability using AWS API Gateway.❖ Logs management on CloudWatch.❖ Maximum execution time – 5 minutes.
AWS RDS❖ Amazon RDS is the “RDBMS” (Relation Database
Management System) in the cloud. ❖ Consumer can launch resizable instances of
different database engines in the cloud and handles the management of admin task for you like automated backups and applying software patches.
AWS RDS – Database Engines❖ RDS support following Database engines:
❖ Amazon Aurora – Amazon version of MySQL cheaper and faster.
❖ MySQL❖ PostgreSQL❖ Oracle❖ SQL Server❖ Maria DB – Community-developed fork of MySQL
RDBMS (Free under GNU GPL)
Employee Service- Stack
Employee Service- Sequence
Demo- Setup RDS
Setup Maven Project - SPRING❖ Create a Spring maven project in STS (jar). Add following
dependencies to POM❖ MySQL❖ Spring – context❖ Spring – core❖ Spring – TX (Transaction)❖ Spring – jdbc ❖ Spring – test❖ Jackson libraray (Jackson-mapper-asl)❖ Junit❖ Aws Lambda (aws-lambda-java-core)
Setup Maven Project - Classes
Setup Maven Project- Spring Context
IAM Role and VPC - Demo
❖ IAM role should have full access to RDS.❖ VPC (ip-address range) in which the lambda
function resides have access to RDS.❖ Demo
Demo – Create and Test Lambda Function
Resources
❖ https://blog.clouddictive.com/2016/07/21/serverless-compute-series-part-4-aws-lambda-and-rds/
❖ https://youtu.be/9CH5UerBtDA❖ https://youtu.be/wRg_PwuBpFk❖ https://youtu.be/mQwmX8weOsY❖ https://youtu.be/c79ytPC_Lco