{"id":2372,"date":"2019-08-23T10:01:17","date_gmt":"2019-08-23T10:01:17","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=2372"},"modified":"2022-03-04T06:15:15","modified_gmt":"2022-03-04T06:15:15","slug":"aws-lambda-basics","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/","title":{"rendered":"AWS Lambda Basics"},"content":{"rendered":"\n<p>Understand the basics of AWS Lambda.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Lets you run code without provisioning or\nmanaging servers. <\/li><li>Pay only for the compute time you consume <\/li><li>No charge when code is not running. <\/li><li>Run code for virtually any type of application\nor backend service &#8211; with zero administration.<\/li><li>Scales application by running code in response\nto each trigger. <\/li><li>Code runs in parallel and processes each trigger\nindividually<\/li><li>Scaling precisely with the size of the workload.\n<\/li><li>Charged for every 100ms code executes and the\nnumber of times code is triggered. <\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Lambda Working<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Lambda runs functions in a serverless\nenvironment to process events. <\/li><li>Each instance of function runs in an isolated\nexecution context <\/li><li>one event at a time is processed.<\/li><li>After finishing event processing, a response is\nreturned and Lambda sends it another event. <\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Lambda Components <\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Function \u2013 A script or program that runs in AWS\nLambda. Lambda passes invocation events to function. The function processes an\nevent and returns a response. <\/li><li>Runtimes \u2013 Lambda runtimes allow functions in\ndifferent languages to run in the same base execution environment. You\nconfigure function to use a runtime that matches programming language. The\nruntime sits in-between the Lambda service and function code, relaying\ninvocation events, context information, and responses between the two. You can\nuse runtimes provided by Lambda, or build own. <\/li><li>Layers \u2013 Lambda layers are a distribution\nmechanism for libraries, custom runtimes, and other function dependencies.\nLayers let you manage in-development function code independently from the unchanging\ncode and resources that it uses. You can configure function to use layers that\nyou create, layers provided by AWS, or layers from other AWS customers. <\/li><li>Event source \u2013 An AWS service, such as Amazon\nSNS, or a custom service, that triggers function and executes its logic. <\/li><li>Downstream resources \u2013 An AWS service, such as\nDynamoDB tables or Amazon S3 buckets, that Lambda function calls once it is\ntriggered.<\/li><li>Log streams \u2013Lambda monitors function\ninvocations and reports metrics to CloudWatch. Annotate function code with\ncustom logging statements to analyze the execution flow and performance of\nLambda function to ensure it&#8217;s working properly.<\/li><li>AWS SAM \u2013 A model to define serverless\napplications. AWS SAM is natively supported by AWS CloudFormation and defines\nsimplified syntax for expressing serverless resources. <\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Lambda function configuration, deployments, and execution limits <\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>\n   <strong>Resource<\/strong><strong><\/strong>\n   <\/td><td>\n   <strong>Limit<\/strong><strong><\/strong>\n   <\/td><\/tr><\/thead><tbody><tr><td>\n  Function memory allocation\n  <\/td><td>\n  128 MB to 3,008 MB, in 64 MB increments.\n  <\/td><\/tr><tr><td>\n  Function timeout\n  <\/td><td>\n  900 seconds (15 minutes)\n  <\/td><\/tr><tr><td>\n  Function environment variables\n  <\/td><td>\n  4 KB\n  <\/td><\/tr><tr><td>\n  Function resource-based policy\n  <\/td><td>\n  20 KB\n  <\/td><\/tr><tr><td>\n  Function layers\n  <\/td><td>\n  5 layers\n  <\/td><\/tr><tr><td>\n  Invocation frequency (requests per second)\n  <\/td><td>\n  10 x concurrent executions limit (synchronous \u2013\n  all sources) \n  10 x concurrent executions limit (asynchronous \u2013 non-AWS sources)\n  Unlimited (asynchronous \u2013 AWS service sources) \n  <\/td><\/tr><tr><td>\n  Invocation payload (request and response) \n  <\/td><td>\n  6 MB (synchronous)\n  256 KB (asynchronous)\n  <\/td><\/tr><tr><td>\n  Deployment package size \n  <\/td><td>\n  50 MB (zipped, for direct upload)\n  250 MB (unzipped, including layers)\n  3 MB (console editor)\n  <\/td><\/tr><tr><td>\n  Test events (console editor)\n  <\/td><td>\n  10\n  <\/td><\/tr><tr><td>\n  <code>\/tmp<\/code> directory storage \n  <\/td><td>\n  512 MB\n  <\/td><\/tr><tr><td>\n  File descriptors\n  <\/td><td>\n  1,024\n  <\/td><\/tr><tr><td>\n  Execution processes\/threads\n  <\/td><td>\n  1,024\n  <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h6 class=\"wp-block-heading\">AWS Lambda-based application lifecycle<\/h6>\n\n\n\n<ul class=\"wp-block-list\"><li>authoring code<\/li><li>deploying code to AWS Lambda<\/li><li>monitoring and troubleshooting<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>AWS Lambda supported languages, their tools and options <\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Language<\/strong><\/td><td><strong>Tools and Options for Authoring Code<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Node.js   <\/td><td>AWS Lambda consoleVisual Studio, with IDE plug-in own authoring environment<\/td><\/tr><tr><td>Java<\/td><td>Eclipse, with AWS Toolkit for Eclipse IntelliJ, with the AWS Toolkit for IntelliJown authoring environment         <\/td><\/tr><tr><td>C#   <\/td><td>Visual Studio, with IDE plug-in .NET Core own authoring environment         <\/td><\/tr><tr><td>Python   <\/td><td>AWS Lambda consolePyCharm, with the AWS Toolkit for PyCharmown authoring environment         <\/td><\/tr><tr><td>Ruby   <\/td><td>AWS Lambda consoleown authoring environment      <\/td><\/tr><tr><td>Go<\/td><td>own authoring environment   <\/td><\/tr><tr><td>PowerShell   <\/td><td>own authoring environmentPowerShell Core 6.0 .NET Core 2.1 SDK AWSLambdaPSCore Module<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/\" target=\"_blank\" rel=\"noreferrer noopener\">Check here for more.<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Understand the basics of AWS Lambda. Lets you run code without provisioning or managing servers. Pay only for the compute time you consume No charge when code is not running. Run code for virtually any type of application or backend service &#8211; with zero administration. Scales application by running code in response to each trigger&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2084,"menu_order":62,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[7,376,114],"class_list":["post-2372","page","type-page","status-publish","hentry","tag-aws","tag-aws-devops","tag-aws-lambda"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AWS Lambda Basics - Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Enhance your knowledge level by learning about AWS Lambda Basics for AWS Certification Exam Preparation Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AWS Lambda Basics - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Enhance your knowledge level by learning about AWS Lambda Basics for AWS Certification Exam Preparation Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-04T06:15:15+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/\",\"name\":\"AWS Lambda Basics - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2019-08-23T10:01:17+00:00\",\"dateModified\":\"2022-03-04T06:15:15+00:00\",\"description\":\"Enhance your knowledge level by learning about AWS Lambda Basics for AWS Certification Exam Preparation Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Certified DevOps Engineer Professional\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"AWS Lambda Basics\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AWS Lambda Basics - Testprep Training Tutorials","description":"Enhance your knowledge level by learning about AWS Lambda Basics for AWS Certification Exam Preparation Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/","og_locale":"en_US","og_type":"article","og_title":"AWS Lambda Basics - Testprep Training Tutorials","og_description":"Enhance your knowledge level by learning about AWS Lambda Basics for AWS Certification Exam Preparation Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2022-03-04T06:15:15+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/","name":"AWS Lambda Basics - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2019-08-23T10:01:17+00:00","dateModified":"2022-03-04T06:15:15+00:00","description":"Enhance your knowledge level by learning about AWS Lambda Basics for AWS Certification Exam Preparation Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/aws-lambda-basics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"AWS Certified DevOps Engineer Professional","item":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/"},{"@type":"ListItem","position":3,"name":"AWS Lambda Basics"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=2372"}],"version-history":[{"count":5,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2372\/revisions"}],"predecessor-version":[{"id":51937,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2372\/revisions\/51937"}],"up":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2084"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=2372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=2372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=2372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}