Aws lambda and accesing AWS RDS - Clouddictive

Download Aws lambda and accesing AWS RDS - Clouddictive

Post on 11-Jan-2017

105 views

Category:

Software

1 download

Embed Size (px)

TRANSCRIPT

<p>AWS Lambda </p> <p>AWS Lambda and RDS Clouddictivehttps://blog.clouddictive.comteam@clouddictive.com</p> <p>AgendaWhat is Serverless ComputeBenefits of Serverless ComputeAWS LambdaHow It WorksRDSEmployee ServiceSetup RDSSetup maven projectCreate and Test lambda function DemoResources</p> <p>Serverless ComputeNext step in the evolution of Cloud ComputingCapability to run your code or a function in the cloud without the need to manage any server in the cloud.Big Players Amazon - AWS LambdaGoogle - Google Cloud FunctionMicrosoft - Azure Functions</p> <p>Benefits of Serverless ComputeNo servers to administer No Need Maintain and Manage Server - applying updatesPay for only code executionNo charge when the code is not runningAutomatic Scaling</p> <p>AWS LambaFunction in the CloudAutomatic ScalingPay as you goPricing 1M requests for free and then $0.20/1m requests.Supported languages Java, Python, and JavaScriptDeployment 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.</p> <p>How It WorksSource - https://aws.amazon.com/lambda/</p> <p>AWS RDSAmazon 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. </p> <p>AWS RDS Database EnginesRDS support following Database engines:Amazon Aurora Amazon version of MySQL cheaper and faster.MySQLPostgreSQLOracleSQL ServerMaria DB Community-developed fork of MySQL RDBMS (Free under GNU GPL)</p> <p>Employee Service- Stack</p> <p>Employee Service- Sequence</p> <p>Demo- Setup RDS</p> <p>Setup Maven Project - SPRINGCreate a Spring maven project in STS (jar). Add following dependencies to POMMySQLSpring contextSpring coreSpring TX (Transaction)Spring jdbc Spring testJackson libraray (Jackson-mapper-asl)JunitAws Lambda (aws-lambda-java-core)</p> <p>Setup Maven Project - Classes</p> <p>Setup Maven Project- Spring Context</p> <p>IAM Role and VPC - DemoIAM role should have full access to RDS.VPC (ip-address range) in which the lambda function resides have access to RDS.Demo</p> <p>Demo Create and Test Lambda Function</p> <p>Resourceshttps://blog.clouddictive.com/2016/07/21/serverless-compute-series-part-4-aws-lambda-and-rds/https://youtu.be/9CH5UerBtDAhttps://youtu.be/wRg_PwuBpFkhttps://youtu.be/mQwmX8weOsYhttps://youtu.be/c79ytPC_Lco</p>