SlideShare a Scribd company logo
BANGKOK
Workshop
Build Serverless Web Application in 30
mins
Vassanon Chotsittirit
COMMUNITY LEADER AND SOFTWARE ENGINEER
Favorite AWS Services: Lambda, Step
Function
Nattawat Kitticharoenjit
COMMUNITY LEADER AND SOFTWARE ENGINEER
Favorite AWS Services: Lambda, DynamoDB
Today you will get
Lambda DynamoDB
S3
(Static Web Hosting)
API Gateway
Cloudfront
Static Web Application and services on AWS
• AWS Service Overview
• Walkthrough Architecture
• Workshop
Agenda
is an object storage service that offers industry-leading scalability,
data availability, security, and performance.
Features
- Unlimit Storage
- Durability 99.999999999% (11 9’s)
- Availability 99.99%
- Host a static website
S3 (Simple Storage Service)
Reference: https://aws.amazon.com/s3/
Amazon CloudFront is a fast content delivery network (CDN)
service that securely delivers data, videos, applications, and
APIs to customers globally with low latency, high transfer speeds, all within
a developer-friendly environment
You can get started with the Content Delivery Network
in minutes
Also support caching at edge location
AWS CloudFront
Reference: https://aws.amazon.com/cloudfront/
is a compute service (Function as a Service) that
lets you run code without provisioning or managing servers.
Scalability
AWS Lambda executes your code only when needed and scales
automatically, from a few requests per day to thousands per second.
Pay per use
You pay only for the compute time you consume
there is no charge when your code is not running.
AWS Lambda
Reference: https://aws.amazon.com/lambda/
• Node.js version (8.10, 10, 12)
• Python version (2.7, 3.6, 3.7, 3.8 )
• Ruby version (2.5)
• Java version (8, 11)
• Go version (1.x)
• .Net Core 2.1
• Custom runtime with lambda layer
Lambda Runtimes
Reference: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
Lambda Working with other services
Reference: https://docs.aws.amazon.com/lambda/latest/dg/lambda-services.html
These services can trigger lambda.
is a fully managed service that makes it easy for developers
to create, publish, maintain, monitor, and secure APIs at any scale.
With a few clicks in the AWS Management Console,
you can create REST and WebSocket APIs that act as a
“front door” for applications to access data, business logic,
or functionality from your backend services,
such as code running on AWS Lambda
AWS API Gateway
Reference: https://aws.amazon.com/api-gateway/
is a key-value and document database (NoSQL)
that delivers single-digit millisecond performance at any scale.
DynamoDB can handle more than 10 trillion requests per day and can
support peaks of more than 20 million requests per second.
it is serverless with no servers to provision, patch,
or manage and no software to install, maintain, or operate.
AWS DynamoDB
Reference:https://aws.amazon.com/dynamodb/
Walkthrough Architecture
Client S3
(Static Web Hosting)
Architecture
Frontend
Backend
To use S3 for a static website, you simply upload files to an S3 bucket and
configure your S3 bucket for web hosting. On a static website, individual
webpages include static content. They might also contain client-side
scripts.
S3 Static Website
Not Support - Dynamic website
(server-side processing)
• PHP
• JSP
• ASP.NET
• Etc.
Support - Static website
(client-side processing)
• React
• Angular
• Vue.js
• Jquery
• etc.
Reference: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
Client S3
(Static Web Hosting)
Cloudfront
Architecture
Frontend
Backend
Client
DynamoDB
S3
(Static Web Hosting)
Cloudfront
Architecture
Frontend
Backend
Client
Lambda DynamoDB
S3
(Static Web Hosting)
Cloudfront
Architecture
Frontend
Backend
Client
Lambda DynamoDB
S3
(Static Web Hosting)
Api Gateway
Cloudfront
Architecture
Frontend
Backend
https://bit.ly/37w0w0v
Download Source Code
Wifi Password
SSID: aws_communityday2019_2G / 5G
Pass: awsusergroupthailand
Let Start Workshop!!
1. Create S3
• Edit “Block public access” by selecting check box to block
all public access
1. Create S3
• Delete Bucket policy by selecting delete button on the right slide
• At this step, your s3 web point must access deny
all request from internet
2. Create CloudFront
• Select “create Distribution” to create new CloudFront
distribution.
2. Create CloudFront
2. Create CloudFront
• Following this selection which create OAI (origin access identity)
To update S3 bucket policy and allow CloudFront access s3 private bucket
• Other options, you can leave it as default
• To restrict access to in your Amazon S3 bucket
• by creating an origin access identity (OAI) and associate it with your
distribution.
• You configure permissions so that CloudFront can use the OAI to access
and serve files to your users
• Users can't use a direct URL to the S3 bucket to access a file there.
CloudFront OAI (origin access identities)
Reference:https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html
{
"Version": "2008-10-17",
"Id": "PolicyForCloudFrontPrivateContent",
"Statement": [
{
"Sid": "1",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity
E3GSZAVY76LRQR"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::acd2019bkk-workshop-21/*"
}
]
}
Example S3 Bucket Policy
Reference: https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html
3. Create DynamoDB
3. Create DynamoDB
3. Create DynamoDB
3. Create DynamoDB
3. Create DynamoDB
• Copy data from sample_data.json in source_code.zip
5. Create Lambda
5. Create Lambda
5. Create Lambda
• These policies are attached to an Lambda CommunityDay role
/* This policy allow lambda to create and put log to Cloudwatch */
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "*"
}
]
}
Example Lambda Function Execution Policy
Reference: https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html
5. Create Lambda
• Copy code from lambda_function.js in source_code.zip and
paste the code in lambda console and then click save at top right
• Use can click test to check log and return data from your code
5. Create API Gateway
5. Create API Gateway
5. Create API Gateway
5. Create API Gateway
5. Create API Gateway
is a browser security feature that restricts cross-origin HTTP requests
that are initiated from scripts running in the browser. If your REST API’s resources
receive non-simple cross-origin HTTP requests, you need to enable CORS support
To support CORS, therefore, a REST API resource needs to implement
an OPTIONS method that can respond to the OPTIONS preflight request with at
least the following response headers mandated by the Fetch standard:
• Access-Control-Allow-Methods
• Access-Control-Allow-Headers
• Access-Control-Allow-Origin
API Gateway (cross-origin resource sharing CORS)
Reference: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html
5. Create API Gateway
5. Create API Gateway
5. Create API Gateway
5. Create API Gateway
• Copy the URL
5. Create API Gateway
• Open index.html in texteditor
• Find and replace <URL Api Gateway> with URL that copy from
previous step
• Upload index.html to S3 bucket where is created at the first step
Replace URL here
6. Test your Website
• Copy Domain name in CloudFront and try it on web browser
by adding path /index.html
eg. http://xxxxxxxx.cloudfront.net/index.html
6. Test your Website
Done!!!
Thank You

More Related Content

What's hot

Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
Michał Kurzeja
 
Serverless Reality
Serverless RealityServerless Reality
Serverless Reality
Lynn Langit
 
Intro to js august 31
Intro to js august 31Intro to js august 31
Intro to js august 31
Thinkful
 
Practical Cloud
Practical CloudPractical Cloud
Practical Cloud
Lynn Langit
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
Yochay Kiriaty
 
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure FunctionsChris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
ServerlessConf
 
Serverless Architecture on AWS
Serverless Architecture on AWSServerless Architecture on AWS
Serverless Architecture on AWS
Rajind Ruparathna
 
Serverless with Kubernetes
Serverless with KubernetesServerless with Kubernetes
Serverless with Kubernetes
Malepati Bala Siva Sai Akhil
 
Serverless Workshop - Tomato Restaurant Rating App
Serverless Workshop - Tomato Restaurant Rating AppServerless Workshop - Tomato Restaurant Rating App
Serverless Workshop - Tomato Restaurant Rating App
Srushith Repakula
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
Nikolaus Graf
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CodeOps Technologies LLP
 
Let's Talk About Serverless - Focusing on AWS Lambda
Let's Talk About Serverless - Focusing on AWS LambdaLet's Talk About Serverless - Focusing on AWS Lambda
Let's Talk About Serverless - Focusing on AWS Lambda
Okis Chuang
 
Serverless Computing
Serverless Computing Serverless Computing
Serverless Computing
Rushi Namani
 
AWS Multiple Account Management
AWS Multiple Account ManagementAWS Multiple Account Management
AWS Multiple Account Management
Yihui Xu
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
ServerlessConf
 
Azure functions
Azure functionsAzure functions
Azure functions
vivek p s
 
.NET Serverless Development on AWS - AWS Online Tech Talks
.NET Serverless Development on AWS - AWS Online Tech Talks.NET Serverless Development on AWS - AWS Online Tech Talks
.NET Serverless Development on AWS - AWS Online Tech Talks
Amazon Web Services
 
The Rise of Serverless Architectures
The Rise of Serverless ArchitecturesThe Rise of Serverless Architectures
The Rise of Serverless Architectures
Benny Bauer
 
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaDeploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
CodeOps Technologies LLP
 
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
從劍宗到氣宗  - 談AWS ECS與Serverless最佳實踐從劍宗到氣宗  - 談AWS ECS與Serverless最佳實踐
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
Pahud Hsieh
 

What's hot (20)

Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
Serverless Reality
Serverless RealityServerless Reality
Serverless Reality
 
Intro to js august 31
Intro to js august 31Intro to js august 31
Intro to js august 31
 
Practical Cloud
Practical CloudPractical Cloud
Practical Cloud
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure FunctionsChris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
Chris Anderson and Yochay Kiriaty - Serverless Patterns with Azure Functions
 
Serverless Architecture on AWS
Serverless Architecture on AWSServerless Architecture on AWS
Serverless Architecture on AWS
 
Serverless with Kubernetes
Serverless with KubernetesServerless with Kubernetes
Serverless with Kubernetes
 
Serverless Workshop - Tomato Restaurant Rating App
Serverless Workshop - Tomato Restaurant Rating AppServerless Workshop - Tomato Restaurant Rating App
Serverless Workshop - Tomato Restaurant Rating App
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
 
Let's Talk About Serverless - Focusing on AWS Lambda
Let's Talk About Serverless - Focusing on AWS LambdaLet's Talk About Serverless - Focusing on AWS Lambda
Let's Talk About Serverless - Focusing on AWS Lambda
 
Serverless Computing
Serverless Computing Serverless Computing
Serverless Computing
 
AWS Multiple Account Management
AWS Multiple Account ManagementAWS Multiple Account Management
AWS Multiple Account Management
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
 
Azure functions
Azure functionsAzure functions
Azure functions
 
.NET Serverless Development on AWS - AWS Online Tech Talks
.NET Serverless Development on AWS - AWS Online Tech Talks.NET Serverless Development on AWS - AWS Online Tech Talks
.NET Serverless Development on AWS - AWS Online Tech Talks
 
The Rise of Serverless Architectures
The Rise of Serverless ArchitecturesThe Rise of Serverless Architectures
The Rise of Serverless Architectures
 
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaDeploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
 
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
從劍宗到氣宗  - 談AWS ECS與Serverless最佳實踐從劍宗到氣宗  - 談AWS ECS與Serverless最佳實踐
從劍宗到氣宗 - 談AWS ECS與Serverless最佳實踐
 

Similar to AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins

AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
Amazon Web Services
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
Amazon Web Services
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
Amazon Web Services
 
Reply Labcamp Rome - AWS Zombie - Serverless and Microservices
Reply Labcamp Rome - AWS Zombie - Serverless and MicroservicesReply Labcamp Rome - AWS Zombie - Serverless and Microservices
Reply Labcamp Rome - AWS Zombie - Serverless and Microservices
Andrea Mercanti
 
SMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsSMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless Applications
Amazon Web Services
 
Fox pong mvp architectual overview
Fox pong mvp architectual overviewFox pong mvp architectual overview
Fox pong mvp architectual overview
daviddaedalus
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
Amazon Web Services
 
AWS Amplify
AWS AmplifyAWS Amplify
Cloud Security-how to create serverless applications
Cloud Security-how to create serverless applicationsCloud Security-how to create serverless applications
Cloud Security-how to create serverless applications
Amazon Web Services
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applications
Amazon Web Services
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
AWS Vietnam Community
 
Primeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverlessPrimeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverless
Amazon Web Services
 
Deep Dive on Serverless Stack
Deep Dive on Serverless StackDeep Dive on Serverless Stack
Deep Dive on Serverless Stack
Amazon Web Services
 
Demistifying serverless on aws
Demistifying serverless on awsDemistifying serverless on aws
Demistifying serverless on aws
AWS Riyadh User Group
 
Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM
Amazon Web Services
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
Daniel Zivkovic
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Amazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
Amazon Web Services
 
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Amazon Web Services
 
Auto Retweets Using AWS Lambda
Auto Retweets Using AWS LambdaAuto Retweets Using AWS Lambda
Auto Retweets Using AWS Lambda
CodeOps Technologies LLP
 

Similar to AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins (20)

AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Reply Labcamp Rome - AWS Zombie - Serverless and Microservices
Reply Labcamp Rome - AWS Zombie - Serverless and MicroservicesReply Labcamp Rome - AWS Zombie - Serverless and Microservices
Reply Labcamp Rome - AWS Zombie - Serverless and Microservices
 
SMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless ApplicationsSMC305 Building CI/CD Pipelines for Serverless Applications
SMC305 Building CI/CD Pipelines for Serverless Applications
 
Fox pong mvp architectual overview
Fox pong mvp architectual overviewFox pong mvp architectual overview
Fox pong mvp architectual overview
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
AWS Amplify
AWS AmplifyAWS Amplify
AWS Amplify
 
Cloud Security-how to create serverless applications
Cloud Security-how to create serverless applicationsCloud Security-how to create serverless applications
Cloud Security-how to create serverless applications
 
Raleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applicationsRaleigh DevDay 2017: Building serverless web applications
Raleigh DevDay 2017: Building serverless web applications
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
 
Primeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverlessPrimeros pasos con arquitecturas serverless
Primeros pasos con arquitecturas serverless
 
Deep Dive on Serverless Stack
Deep Dive on Serverless StackDeep Dive on Serverless Stack
Deep Dive on Serverless Stack
 
Demistifying serverless on aws
Demistifying serverless on awsDemistifying serverless on aws
Demistifying serverless on aws
 
Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
 
Auto Retweets Using AWS Lambda
Auto Retweets Using AWS LambdaAuto Retweets Using AWS Lambda
Auto Retweets Using AWS Lambda
 

Recently uploaded

Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 

Recently uploaded (20)

Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 

AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins

  • 2. Workshop Build Serverless Web Application in 30 mins
  • 3. Vassanon Chotsittirit COMMUNITY LEADER AND SOFTWARE ENGINEER Favorite AWS Services: Lambda, Step Function Nattawat Kitticharoenjit COMMUNITY LEADER AND SOFTWARE ENGINEER Favorite AWS Services: Lambda, DynamoDB
  • 4. Today you will get Lambda DynamoDB S3 (Static Web Hosting) API Gateway Cloudfront Static Web Application and services on AWS
  • 5. • AWS Service Overview • Walkthrough Architecture • Workshop Agenda
  • 6. is an object storage service that offers industry-leading scalability, data availability, security, and performance. Features - Unlimit Storage - Durability 99.999999999% (11 9’s) - Availability 99.99% - Host a static website S3 (Simple Storage Service) Reference: https://aws.amazon.com/s3/
  • 7. Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment You can get started with the Content Delivery Network in minutes Also support caching at edge location AWS CloudFront Reference: https://aws.amazon.com/cloudfront/
  • 8. is a compute service (Function as a Service) that lets you run code without provisioning or managing servers. Scalability AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second. Pay per use You pay only for the compute time you consume there is no charge when your code is not running. AWS Lambda Reference: https://aws.amazon.com/lambda/
  • 9. • Node.js version (8.10, 10, 12) • Python version (2.7, 3.6, 3.7, 3.8 ) • Ruby version (2.5) • Java version (8, 11) • Go version (1.x) • .Net Core 2.1 • Custom runtime with lambda layer Lambda Runtimes Reference: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
  • 10. Lambda Working with other services Reference: https://docs.aws.amazon.com/lambda/latest/dg/lambda-services.html These services can trigger lambda.
  • 11. is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. With a few clicks in the AWS Management Console, you can create REST and WebSocket APIs that act as a “front door” for applications to access data, business logic, or functionality from your backend services, such as code running on AWS Lambda AWS API Gateway Reference: https://aws.amazon.com/api-gateway/
  • 12. is a key-value and document database (NoSQL) that delivers single-digit millisecond performance at any scale. DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second. it is serverless with no servers to provision, patch, or manage and no software to install, maintain, or operate. AWS DynamoDB Reference:https://aws.amazon.com/dynamodb/
  • 14. Client S3 (Static Web Hosting) Architecture Frontend Backend
  • 15. To use S3 for a static website, you simply upload files to an S3 bucket and configure your S3 bucket for web hosting. On a static website, individual webpages include static content. They might also contain client-side scripts. S3 Static Website Not Support - Dynamic website (server-side processing) • PHP • JSP • ASP.NET • Etc. Support - Static website (client-side processing) • React • Angular • Vue.js • Jquery • etc. Reference: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
  • 16. Client S3 (Static Web Hosting) Cloudfront Architecture Frontend Backend
  • 18. Client Lambda DynamoDB S3 (Static Web Hosting) Cloudfront Architecture Frontend Backend
  • 19. Client Lambda DynamoDB S3 (Static Web Hosting) Api Gateway Cloudfront Architecture Frontend Backend
  • 20. https://bit.ly/37w0w0v Download Source Code Wifi Password SSID: aws_communityday2019_2G / 5G Pass: awsusergroupthailand
  • 22. 1. Create S3 • Edit “Block public access” by selecting check box to block all public access
  • 23. 1. Create S3 • Delete Bucket policy by selecting delete button on the right slide • At this step, your s3 web point must access deny all request from internet
  • 24. 2. Create CloudFront • Select “create Distribution” to create new CloudFront distribution.
  • 26. 2. Create CloudFront • Following this selection which create OAI (origin access identity) To update S3 bucket policy and allow CloudFront access s3 private bucket • Other options, you can leave it as default
  • 27. • To restrict access to in your Amazon S3 bucket • by creating an origin access identity (OAI) and associate it with your distribution. • You configure permissions so that CloudFront can use the OAI to access and serve files to your users • Users can't use a direct URL to the S3 bucket to access a file there. CloudFront OAI (origin access identities) Reference:https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html
  • 28. { "Version": "2008-10-17", "Id": "PolicyForCloudFrontPrivateContent", "Statement": [ { "Sid": "1", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E3GSZAVY76LRQR" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::acd2019bkk-workshop-21/*" } ] } Example S3 Bucket Policy Reference: https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html
  • 33. 3. Create DynamoDB • Copy data from sample_data.json in source_code.zip
  • 36. 5. Create Lambda • These policies are attached to an Lambda CommunityDay role
  • 37. /* This policy allow lambda to create and put log to Cloudwatch */ { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "*" } ] } Example Lambda Function Execution Policy Reference: https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html
  • 38. 5. Create Lambda • Copy code from lambda_function.js in source_code.zip and paste the code in lambda console and then click save at top right • Use can click test to check log and return data from your code
  • 39. 5. Create API Gateway
  • 40. 5. Create API Gateway
  • 41. 5. Create API Gateway
  • 42. 5. Create API Gateway
  • 43. 5. Create API Gateway
  • 44. is a browser security feature that restricts cross-origin HTTP requests that are initiated from scripts running in the browser. If your REST API’s resources receive non-simple cross-origin HTTP requests, you need to enable CORS support To support CORS, therefore, a REST API resource needs to implement an OPTIONS method that can respond to the OPTIONS preflight request with at least the following response headers mandated by the Fetch standard: • Access-Control-Allow-Methods • Access-Control-Allow-Headers • Access-Control-Allow-Origin API Gateway (cross-origin resource sharing CORS) Reference: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html
  • 45. 5. Create API Gateway
  • 46. 5. Create API Gateway
  • 47. 5. Create API Gateway
  • 48. 5. Create API Gateway • Copy the URL
  • 49. 5. Create API Gateway • Open index.html in texteditor • Find and replace <URL Api Gateway> with URL that copy from previous step • Upload index.html to S3 bucket where is created at the first step Replace URL here
  • 50. 6. Test your Website • Copy Domain name in CloudFront and try it on web browser by adding path /index.html eg. http://xxxxxxxx.cloudfront.net/index.html
  • 51. 6. Test your Website Done!!!