{"id":27488654,"url":"https://github.com/krasovsky22/aws_presentation","last_synced_at":"2026-04-16T05:33:58.513Z","repository":{"id":123857526,"uuid":"181940144","full_name":"krasovsky22/aws_presentation","owner":"krasovsky22","description":"AWS Presentation","archived":false,"fork":false,"pushed_at":"2019-04-17T21:34:16.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T03:51:57.760Z","etag":null,"topics":["aws","aws-amplify","aws-lambda","aws-serverless","laravel","react","serverless"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krasovsky22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-17T17:38:48.000Z","updated_at":"2019-04-17T21:34:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"87e1c414-4289-4c10-b87e-a847fc23f2f1","html_url":"https://github.com/krasovsky22/aws_presentation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krasovsky22/aws_presentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasovsky22%2Faws_presentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasovsky22%2Faws_presentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasovsky22%2Faws_presentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasovsky22%2Faws_presentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krasovsky22","download_url":"https://codeload.github.com/krasovsky22/aws_presentation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krasovsky22%2Faws_presentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31872654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-amplify","aws-lambda","aws-serverless","laravel","react","serverless"],"created_at":"2025-04-16T19:58:56.814Z","updated_at":"2026-04-16T05:33:58.503Z","avatar_url":"https://github.com/krasovsky22.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Presentation\n\n**Table of Contents**\n\n- [Why ServerLess](#Why_ServerLess)\n- [Lambda Functions](#Lambda_functions)\n  - [Storage](#Storage)\n  - [Application Data](#Application_Data)\n  - [Laravel](#Laravel)\n- [API Gateway](#API_Gateway)\n- [Architecture](#Architecture)\n- [SAM](#Sam)\n- [Amplify](#Amplify)\n\n## Why ServerLess\n\nServerless replaces the traditional approaches to running applications.\n\nWith serverless:\n\n- We don't manage, update, configure, provision servers or containers,\n- We don't reserve or scale servers or containers, instead they are scaled automatically and transparently for us.\n- We don't pay for fixed resources, instead we pay for what we actually use (e.g. execution time).\n\n**Serverless can provide more scalable, affordable and reliable architectures for less effort.** \u003csup\u003e[See more](https://bref.sh/docs/).\u003c/sup\u003e\u003cbr\u003e\n\n# Lambda Functions\n\n**AWS Lambda** is a compute service that lets you run code without provisioning or managing servers. **AWS Lambda** executes your code only when needed and scales automatically, from a few requests per day to thousands per second. You pay only for the compute time you consume - there is no charge when your code is not running. With **AWS Lambda**, you can run code for virtually any type of application or backend service - all with zero administration. **AWS Lambda** runs your code on a high-availability compute infrastructure and performs all of the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, code monitoring and logging. All you need to do is supply your code in one of the languages that AWS Lambda supports.\u003csup\u003e[See more](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)\u003c/sup\u003e\u003cbr\u003e\n\n## Storage\n\nThe filesystem on AWS Lambda is **read-only**, except for the **/tmp** directory.\n\nApplication data must not be stored in **/tmp** because of the behavior described above.\nInstead data can be stored in databases or in storage services like **AWS S3**.\n\n## Application Data\n\nApplication data must not be stored in **/tmp** because of the behavior described above.\n\nInstead data can be stored in databases or in storage services like **AWS S3**.\n\n## Laravel\n\nThere is no built-in support for PHP on AWS Lambda. Instead we need to use 3rd party runtimes via the system of Lambda layers. Example: [Bref](https://github.com/mnapoli/bref)\n\nExample: [laravel](https://5jrawet8pl.execute-api.us-east-2.amazonaws.com/Prod)\n\n## Dashboard\n\n![SLIDESHOW](images/lambda-management.jpg)\n\n## Application cache\n\nPerformance-wise, using AWS S3 for storing the application cache is not ideal.\n\nThe following solutions can be used instead:\n\n- pre-generate the cache in the project directory before deploying\n- store the cache into the /tmp directory\n- store the cache into a distributed cache service like Memcache or Redis\n\n![SLIDESHOW](images/Lambda-Management-Console.jpg)\n\n# API Gateway\n\nAmazon API Gateway is an AWS service for creating, publishing, maintaining, monitoring, and securing REST and WebSocket APIs at any scale. API developers can create APIs that access AWS or other web services as well as data stored in the AWS Cloud. As an API Gateway API developer, you can create APIs for use in your own client applications (apps). Or you can make your APIs available to third-party app developers. For more information, see Who Uses API Gateway?.\n\nAPI Gateway creates REST APIs that:\n\n- Are HTTP-based.\n- Adhere to the REST protocol, which enables stateless client-server communication.\n- Implement standard HTTP methods such as GET, POST, PUT, PATCH and DELETE.\n\n\u003csup\u003e[See more](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html)\u003c/sup\u003e\u003cbr\u003e\n\n![SLIDESHOW](images/API-Gateway.jpg)\n\n# Architecture\n\n![SLIDESHOW](https://raw.githubusercontent.com/taimos/serverless-todo-demo/master/architecture.png)\n\n# SAM\n\n![SLIDESHOW](https://raw.githubusercontent.com/awslabs/serverless-application-model/master/aws_sam_introduction.png)\n\nThe AWS Serverless Application Model (AWS SAM) is an open-source framework that you can use to build serverless applications on AWS.\n\nYou can use AWS SAM to define your serverless applications. AWS SAM consists of the following components:\n\n## Benefits of Using AWS SAM\n\nBecause AWS SAM integrates with other AWS services, creating serverless applications with AWS SAM provides the following benefits:\n\n- **Single-deployment configuration**. AWS SAM makes it easy to organize related components and resources, and operate on a single stack. You can use AWS SAM to share configuration (such as memory and timeouts) between resources, and deploy all related resources together as a single, versioned entity.\n\n- **Extension of AWS CloudFormation**. Because AWS SAM is an extension of AWS CloudFormation, you get the reliable deployment capabilities of AWS CloudFormation. You can define resources by using AWS CloudFormation in your AWS SAM template. Also, you can use the full suite of resources, intrinsic functions, and other template features that are available in AWS CloudFormation.\n\n- **Built-in best practices**. You can use AWS SAM to define and deploy your infrastructure as config. This makes it possible for you to use and enforce best practices such as code reviews. Also, with a few lines of configuration, you can enable safe deployments through CodeDeploy, and can enable tracing by using AWS X-Ray.\n\n```yaml\nAWSTemplateFormatVersion: \"2010-09-09\"\nTransform: AWS::Serverless-2016-10-31\nDescription: \"Bref demo for Laravel\"\n\nGlobals:\n  Function:\n    Environment:\n      Variables:\n        # Laravel environment variables\n        APP_STORAGE: \"/tmp/laravel\"\n\nResources:\n  Website:\n    Type: AWS::Serverless::Function\n    Properties:\n      FunctionName: \"bref-demo-laravel-website\"\n      CodeUri: .\n      Handler: public/index.php\n      Timeout: 30 # in seconds (API Gateway has a timeout of 30 seconds)\n      Runtime: provided\n      Layers:\n        - \"arn:aws:lambda:us-east-2:209497400698:layer:php-73-fpm:1\"\n      Events:\n        # The function will match all HTTP URLs\n        HttpRoot:\n          Type: Api\n          Properties:\n            Path: /\n            Method: ANY\n        HttpSubPaths:\n          Type: Api\n          Properties:\n            Path: /{proxy+}\n            Method: ANY\n  Console:\n    Type: AWS::Serverless::Function\n    Properties:\n      FunctionName: \"bref-demo-laravel-artisan\"\n      CodeUri: .\n      Handler: artisan\n      Timeout: 120\n      Runtime: provided\n      Layers:\n        # PHP runtime\n        - \"arn:aws:lambda:us-east-2:209497400698:layer:php-73:1\"\n        # Console layer\n        - \"arn:aws:lambda:us-east-2:209497400698:layer:console:1\"\n\n# Outputs show up in the CloudFormation dashboard\nOutputs:\n  DemoHttpApi:\n    Description: \"URL of our function in the *Prod* environment\"\n    Value: !Sub \"https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/\"\n```\n\n## Makefile\n\n```\ndeploy:\n\tphp artisan config:clear\n\tsam package --output-template-file .stack.yaml --region us-east-2 --s3-bucket {BUCKET}\n\tsam deploy  --template-file .stack.yaml --capabilities CAPABILITY_IAM --region us-east-2 --stack-name laravel-bref-demo-1\n```\n\n# Amplify\n\nAt a high level, **Amplify** revolves around the ‘**aws-exports**’ file. This file is generated by the Amplify CLI, and contains information about the serverless resources you create with the CLI.\n\nThe **Amplify** Library then reads the JSON in this file when you pass it to the Amplify.configure method. Once the **Amplify** Library has been configured, it can access your AWS resources.\n\nFinally, the **Amplify** UI components can then use the **Amplify** library to automatically perform tasks such as authentication, S3 uploads, etc.\n\nYou can use the **Amplify CLI** and the **Amplify** Library/UI Components separately, but they are most powerful when used together.\n\nExample: [example](http://awsreactfrontendexam-20190417075706-hostingbucket-dev.s3-website.us-east-2.amazonaws.com/)\u003cbr\u003e\nGithub: [todo-frontend](https://github.com/krasovsky22/aws-react-frontend-example)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrasovsky22%2Faws_presentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrasovsky22%2Faws_presentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrasovsky22%2Faws_presentation/lists"}