Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
EN
Uploaded by
Amazon Web Services Japan
PDF, PPTX
7,321 views
20180221 AWS Black Belt Online Seminar AWS Lambda@Edge
2018/2/21 配信分:AWS Black Belt Online Seminar AWS Lambda@Edge
Technology
◦
Read more
14
Save
Share
Embed
Embed presentation
Download
Download as PDF, PPTX
1
/ 60
2
/ 60
3
/ 60
4
/ 60
5
/ 60
6
/ 60
7
/ 60
8
/ 60
9
/ 60
10
/ 60
11
/ 60
12
/ 60
13
/ 60
14
/ 60
15
/ 60
16
/ 60
17
/ 60
18
/ 60
19
/ 60
20
/ 60
21
/ 60
22
/ 60
23
/ 60
24
/ 60
25
/ 60
26
/ 60
27
/ 60
28
/ 60
29
/ 60
30
/ 60
31
/ 60
32
/ 60
33
/ 60
34
/ 60
35
/ 60
36
/ 60
37
/ 60
38
/ 60
39
/ 60
40
/ 60
41
/ 60
42
/ 60
43
/ 60
44
/ 60
45
/ 60
46
/ 60
47
/ 60
48
/ 60
49
/ 60
50
/ 60
51
/ 60
52
/ 60
53
/ 60
54
/ 60
55
/ 60
56
/ 60
57
/ 60
58
/ 60
59
/ 60
60
/ 60
More Related Content
PDF
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
by
Amazon Web Services Japan
PDF
20191105 AWS Black Belt Online Seminar Amazon Route 53 Hosted Zone
by
Amazon Web Services Japan
PDF
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
by
Amazon Web Services Japan
PDF
AWS Black Belt Online Seminar 2017 AWS Storage Gateway
by
Amazon Web Services Japan
PDF
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
by
Amazon Web Services Japan
PDF
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
by
Amazon Web Services Japan
PDF
20190319 AWS Black Belt Online Seminar Amazon FSx for Windows Server
by
Amazon Web Services Japan
PDF
AWS Black Belt Online Seminar 2018 AWS Certificate Manager
by
Amazon Web Services Japan
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
by
Amazon Web Services Japan
20191105 AWS Black Belt Online Seminar Amazon Route 53 Hosted Zone
by
Amazon Web Services Japan
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
by
Amazon Web Services Japan
AWS Black Belt Online Seminar 2017 AWS Storage Gateway
by
Amazon Web Services Japan
20190220 AWS Black Belt Online Seminar Amazon S3 / Glacier
by
Amazon Web Services Japan
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
by
Amazon Web Services Japan
20190319 AWS Black Belt Online Seminar Amazon FSx for Windows Server
by
Amazon Web Services Japan
AWS Black Belt Online Seminar 2018 AWS Certificate Manager
by
Amazon Web Services Japan
What's hot
PDF
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
by
Amazon Web Services Japan
PDF
20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver
by
Amazon Web Services Japan
PDF
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
by
Amazon Web Services Japan
PDF
20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-
by
Amazon Web Services Japan
PDF
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
by
Amazon Web Services Japan
PDF
20190130 AWS Black Belt Online Seminar AWS Identity and Access Management (AW...
by
Amazon Web Services Japan
PDF
20190806 AWS Black Belt Online Seminar AWS Glue
by
Amazon Web Services Japan
PDF
20200617 AWS Black Belt Online Seminar Amazon Athena
by
Amazon Web Services Japan
PDF
20210316 AWS Black Belt Online Seminar AWS DataSync
by
Amazon Web Services Japan
PDF
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
by
Amazon Web Services Japan
PDF
AWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
by
Amazon Web Services Japan
PDF
20191126 AWS Black Belt Online Seminar Amazon AppStream 2.0
by
Amazon Web Services Japan
PDF
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
by
Amazon Web Services Japan
PDF
20191023 AWS Black Belt Online Seminar Amazon EMR
by
Amazon Web Services Japan
PDF
20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
by
Amazon Web Services Japan
PDF
20190514 AWS Black Belt Online Seminar Amazon API Gateway
by
Amazon Web Services Japan
PDF
20190522 AWS Black Belt Online Seminar AWS Step Functions
by
Amazon Web Services Japan
PDF
20201111 AWS Black Belt Online Seminar AWS CodeStar & AWS CodePipeline
by
Amazon Web Services Japan
PDF
AWS Black Belt Online Seminar 2017 Amazon ElastiCache
by
Amazon Web Services Japan
PDF
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
by
Amazon Web Services Japan
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
by
Amazon Web Services Japan
20191016 AWS Black Belt Online Seminar Amazon Route 53 Resolver
by
Amazon Web Services Japan
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
by
Amazon Web Services Japan
20210330 AWS Black Belt Online Seminar AWS Glue -Glue Studioを使ったデータ変換のベストプラクティス-
by
Amazon Web Services Japan
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
by
Amazon Web Services Japan
20190130 AWS Black Belt Online Seminar AWS Identity and Access Management (AW...
by
Amazon Web Services Japan
20190806 AWS Black Belt Online Seminar AWS Glue
by
Amazon Web Services Japan
20200617 AWS Black Belt Online Seminar Amazon Athena
by
Amazon Web Services Japan
20210316 AWS Black Belt Online Seminar AWS DataSync
by
Amazon Web Services Japan
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
by
Amazon Web Services Japan
AWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
by
Amazon Web Services Japan
20191126 AWS Black Belt Online Seminar Amazon AppStream 2.0
by
Amazon Web Services Japan
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
by
Amazon Web Services Japan
20191023 AWS Black Belt Online Seminar Amazon EMR
by
Amazon Web Services Japan
20190410 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
by
Amazon Web Services Japan
20190514 AWS Black Belt Online Seminar Amazon API Gateway
by
Amazon Web Services Japan
20190522 AWS Black Belt Online Seminar AWS Step Functions
by
Amazon Web Services Japan
20201111 AWS Black Belt Online Seminar AWS CodeStar & AWS CodePipeline
by
Amazon Web Services Japan
AWS Black Belt Online Seminar 2017 Amazon ElastiCache
by
Amazon Web Services Japan
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
by
Amazon Web Services Japan
Similar to 20180221 AWS Black Belt Online Seminar AWS Lambda@Edge
PDF
20190730 AWS Black Belt Online Seminar Amazon CloudFrontの概要
by
Amazon Web Services Japan
PDF
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
by
Amazon Web Services Japan
PPTX
AWSで認証機能のついたサイトを手軽に構築する(Cognito+CloudFront+API Gateway)
by
RyosukeTakeuchi8
PDF
20120611 aws meister-reloaded-cloud-front-public
by
Amazon Web Services Japan
PDF
Awsmeister cloudfront20120611-slideshare用
by
Yasuhiro Araki, Ph.D
PDF
[AWSマイスターシリーズ] Amazon CloudFront / Amazon Elastic Transcoderによるコンテンツ配信
by
Amazon Web Services Japan
PDF
about the CloudFront
by
RyosukeKado
PDF
Aws summits2014 amazon_cloudfrontを利用したサイト高速化とセキュア配信
by
Boss4434
PDF
AWS Black Belt Online Seminar AWS Amplify
by
Amazon Web Services Japan
PDF
AWS Black Belt Tech シリーズ 2016 - Amazon CloudFront
by
Amazon Web Services Japan
PDF
AWS Black Belt Techシリーズ Amazon CloudFront
by
Amazon Web Services Japan
PPTX
20140906 jaws festa 2014 cloud front+route53
by
Takuo Watanabe
PDF
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説
by
Amazon Web Services Japan
PDF
AWS Lambda ハンズオン 2-Tier アーキテクチャで未来へ
by
Amazon Web Services Japan
PDF
突発イベントにおけるEC2の極力排除ならびにサービス徹底活用
by
Yasuhiro Araki, Ph.D
PDF
20180710 AWS Black Belt Online Seminar AWS入門者向け: AWSで実現するウェブサイトホスティング
by
Amazon Web Services Japan
PDF
JAWS-UG アーキテクチャ専門支部 re:Invent Management Tools ダイジェスト
by
Yukitaka Ohmura
PPTX
今だから!Amazon CloudFront 徹底活用
by
Yasuhiro Araki, Ph.D
PDF
20170705 blackbelt AWS Lambda
by
Amazon Web Services Japan
PDF
AWS Solution Architect Associate試験勉強メモ
by
Tadayasu Yotsu
20190730 AWS Black Belt Online Seminar Amazon CloudFrontの概要
by
Amazon Web Services Japan
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
by
Amazon Web Services Japan
AWSで認証機能のついたサイトを手軽に構築する(Cognito+CloudFront+API Gateway)
by
RyosukeTakeuchi8
20120611 aws meister-reloaded-cloud-front-public
by
Amazon Web Services Japan
Awsmeister cloudfront20120611-slideshare用
by
Yasuhiro Araki, Ph.D
[AWSマイスターシリーズ] Amazon CloudFront / Amazon Elastic Transcoderによるコンテンツ配信
by
Amazon Web Services Japan
about the CloudFront
by
RyosukeKado
Aws summits2014 amazon_cloudfrontを利用したサイト高速化とセキュア配信
by
Boss4434
AWS Black Belt Online Seminar AWS Amplify
by
Amazon Web Services Japan
AWS Black Belt Tech シリーズ 2016 - Amazon CloudFront
by
Amazon Web Services Japan
AWS Black Belt Techシリーズ Amazon CloudFront
by
Amazon Web Services Japan
20140906 jaws festa 2014 cloud front+route53
by
Takuo Watanabe
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説
by
Amazon Web Services Japan
AWS Lambda ハンズオン 2-Tier アーキテクチャで未来へ
by
Amazon Web Services Japan
突発イベントにおけるEC2の極力排除ならびにサービス徹底活用
by
Yasuhiro Araki, Ph.D
20180710 AWS Black Belt Online Seminar AWS入門者向け: AWSで実現するウェブサイトホスティング
by
Amazon Web Services Japan
JAWS-UG アーキテクチャ専門支部 re:Invent Management Tools ダイジェスト
by
Yukitaka Ohmura
今だから!Amazon CloudFront 徹底活用
by
Yasuhiro Araki, Ph.D
20170705 blackbelt AWS Lambda
by
Amazon Web Services Japan
AWS Solution Architect Associate試験勉強メモ
by
Tadayasu Yotsu
More from Amazon Web Services Japan
PDF
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
by
Amazon Web Services Japan
PDF
202204 AWS Black Belt Online Seminar AWS IoT Device Defender
by
Amazon Web Services Japan
PDF
Infrastructure as Code (IaC) 談義 2022
by
Amazon Web Services Japan
PDF
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
by
Amazon Web Services Japan
PDF
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
by
Amazon Web Services Japan
PDF
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
by
Amazon Web Services Japan
PPTX
20220409 AWS BLEA 開発にあたって検討したこと
by
Amazon Web Services Japan
PDF
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
by
Amazon Web Services Japan
PDF
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
by
Amazon Web Services Japan
PDF
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
by
Amazon Web Services Japan
PDF
Amazon QuickSight の組み込み方法をちょっぴりDD
by
Amazon Web Services Japan
PDF
マルチテナント化で知っておきたいデータベースのこと
by
Amazon Web Services Japan
PDF
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
by
Amazon Web Services Japan
PDF
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
by
Amazon Web Services Japan
PDF
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
by
Amazon Web Services Japan
PDF
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
by
Amazon Web Services Japan
PDF
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
by
Amazon Web Services Japan
PPTX
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
by
Amazon Web Services Japan
PDF
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
by
Amazon Web Services Japan
PDF
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
by
Amazon Web Services Japan
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
by
Amazon Web Services Japan
202204 AWS Black Belt Online Seminar AWS IoT Device Defender
by
Amazon Web Services Japan
Infrastructure as Code (IaC) 談義 2022
by
Amazon Web Services Japan
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
by
Amazon Web Services Japan
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
by
Amazon Web Services Japan
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
by
Amazon Web Services Japan
20220409 AWS BLEA 開発にあたって検討したこと
by
Amazon Web Services Japan
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
by
Amazon Web Services Japan
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
by
Amazon Web Services Japan
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
by
Amazon Web Services Japan
Amazon QuickSight の組み込み方法をちょっぴりDD
by
Amazon Web Services Japan
マルチテナント化で知っておきたいデータベースのこと
by
Amazon Web Services Japan
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
by
Amazon Web Services Japan
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
by
Amazon Web Services Japan
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
by
Amazon Web Services Japan
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
by
Amazon Web Services Japan
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
by
Amazon Web Services Japan
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
by
Amazon Web Services Japan
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
by
Amazon Web Services Japan
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
by
Amazon Web Services Japan
20180221 AWS Black Belt Online Seminar AWS Lambda@Edge
1.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 【AWS Black Belt Online Seminar】 AWS Lambda@Edge アマゾンウェブサービスジャパン株式会社 ソリューションアーキテクト 藤原 吉規 2018.02.21 Amazon CloudFront AWS Lambda AWS Lambda@Edge
2.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 自己紹介 藤原 吉規 (ふじわら よしのり) 西日本担当 ソリューション アーキテクト • AWS 大阪オフィスにいます • 関西のビジネスチャットスタートアップ企業で 6 年間 AWS を活用 • Edge 系サービスを担当 • AWS サムライ 2013 • 好きな AWS サービス: AWS サポート
3.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. AWS Black Belt Online Seminarとは AWSJのTechメンバがAWSに関する様々な事を紹介するオンラインセミナーです ※開催曜日と時間帯は変更となる場合がございます。最新の情報は下記をご確認下さい。 オンラインセミナーのスケジュール&申し込みサイト https://aws.amazon.com/jp/about-aws/events/webinars/ 【火曜 12:00〜13:00】 主にAWSのソリューションや 業界カットでの使いどころなどを紹介 (例:IoT、金融業界向け etc.) 【水曜 18:00〜19:00】 主にAWSサービスの紹介や アップデートの解説 (例:EC2、RDS、Lambda etc.)
4.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 内容についての注意点 • 本資料では2018年2月21日時点のサービス内容および価格についてご説明しています。最新の情報は AWS公式ウェブサイト(http://aws.amazon.com)にてご確認ください。 • 資料作成には十分注意しておりますが、資料内の価格とAWS公式ウェブサイト記載の価格に相違が あった場合、AWS公式ウェブサイトの価格を優先とさせていただきます。 • 価格は税抜表記となっています。日本居住者のお客様が東京リージョンを使用する場合、別途消費 税をご請求させていただきます。 • AWS does not offer binding price quotes. AWS pricing is publicly available and is subject to change in accordance with the AWS Customer Agreement available at http://aws.amazon.com/agreement/. Any pricing information included in this document is provided only as an estimate of usage charges for AWS services based on certain information that you have provided. Monthly charges will be based on your actual use of AWS services, and may vary from the estimates provided.
5.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Agenda • なぜ Edge で Web サイトを動かすのか? • Lambda@Edge とは? • Lambda@Edge がどのように役立つのか?
6.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. はじめに。。。 • あなたは画期的なアイディアを持っていて • MVP で Web サイトを構築することに決め • AWS をプラットフォームに選択しました
7.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例: ニュース配信サイト 動的なユーザーコンテンツ (パーソナライズ) 認証 動的コンテンツ (News feed) 静的コンテンツ (images,JS,CSS, …) カスタマイズされた 動的コンテンツ (ロケーション)
8.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. シンプルなアーキテクチャ Compute Viewer (クライアント) StorageDatastore
9.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. シンプルなアーキテクチャ Origin
10.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. その後、サイトがヒットして成長フェーズへ Time Growth
11.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. そして、今では。。。 Origin
12.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 新たなチャレンジ • 増加し続けるリクエストに対応 • スケールするインフラストラクチャ • 運用上の複雑さを管理 • もちろん、優れたユーザーエクスペリエンスを提供し続ける • 速いページ読み込み • 豊富な機能セット
13.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Lambda@Edge Amazon CloudFront AWS Lambda Lambda@Edge
14.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon CloudFront Content Delivery Network
15.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon CloudFront Global Content Delivery Network 117 PoPs (103 エッジロケーション + 11 リージョナルエッジキャッシュ)
16.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon CloudFront Origin AWS Location AWS Location AWS Location AWS Location AWS Location AWS Location
17.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. CloudFront によるコンテンツアクセラレーション 動的コンテンツ (News feed)静的コンテンツ (images,JS,CSS, …) カスタマイズされた 動的コンテンツ (ロケーション)
18.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. AWS Lambda Serverless Compute
19.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. AWS Lambda 完全に自動化 された管理 自動 スケーリング 利用に応じた 支払い 組み込みの 耐障害性
20.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. AWS Lambda@Edge グローバル 分散 利用に応じた 支払い 組み込みの 耐障害性 完全に自動化 された管理 自動 スケーリング
21.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 一度 Lambda 関数を書けば、グローバルで実行可能 N Virginia AWS Location AWS Location AWS Location AWS Location AWS Location AWS Location
22.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Lambda@Edge – Deep dive
23.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Lambda@Edge Events CloudFront cache Viewer Response Origin Response Origin Origin Request Viewer (クライアント) Viewer Request https://docs.aws.amazon.com/ja_jp/AmazonCloudFront/latest/DeveloperGuide/lambda-cloudfront-trigger-events.html
24.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. イベント・ドリブン • 関数はイベントに関連付けられる • 関数はイベント発生時に実行される • 関数は入力イベントの内容を受け取って実行される • 関数は呼び出し元に変更した結果を返す必要がある • viewer-request -> my_function:1 • viewer-request は CloudFront がリクエストを受信した時に実行され る • my_function:1 はリクエストオブジェクトを受け取って実行される • callback(null, request) Lambda@Edge のプログラミングモデル
25.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Lambda@Edge のプログラミングモデル exports.handler = (event, context, callback) => { /* viewer-request and origin-request events * have the request as input */ const request = event.Records[0].cf.request; /* viewer-response and origin-response events * have the response as input */ /* const response = event.Records[0].cf.response; */ /* Do the processing – say add a header */ /* When I am done I let CloudFront what to do next */ callback(null, request); }
26.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Lambda@Edge によるカスタマイズ カスタマイズされた 動的コンテンツ (ロケーション)
27.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. カスタマイズ – 入力 パーソナライズ以外のカスタマイズ – リクエスト属性 • 地理的: ローカル/地域/国 • 天気、最新の交通情報、ニュース、イベント • デバイスタイプ • Mobile / Desktop • 解像度: HD / 720p • User Agent • クローラー / 実際のユーザ • Referer • パーソナライズ • ユーザID + そのユーザに関連する情報
28.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. オリジンベース • CloudFront cache を使用 – URL, Header, クエリパラメータ カスタマイズ – 設定 Serverless • CloudFront cache を使用 – URL, Header, クエリパラメータ • オリジンの動的な選択 • Edge でコンテンツを生成
29.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. カスタマイズ – 例 URL の変更 • Viewer(クライアント) アクセス元の国ごとに異なるコンテンツを配信 • 例: “/index.html” + CloudFront-Viewer-Country -> “/jp/index.html” or “/us/index.html” or “/tw/index.html”) • 同じディストリビューションから異なる web assets を配信 • 例: Host header を使用して URL をリライト • “/index.html” + “Host: foo.com”-> URL: “/foo_com/index.html” • “/index.html” + “Host: bar.com” -> URL: “/bar_com/index.html” • デバイスタイプごとに異なるコンテンツを配信 • 例: “/index.html” + CloudFront-Is-Mobile-Viewer -> URL: “/mobile/index.html” or “/desktop/index.html”
30.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. カスタマイズ – 例 ヘッダの追加/変更/削除 • セキュリティヘッダ • 例: HSTS, CORS ヘッダを全てのレスポンスに追加 • S3 オブジェクトに Cache-control ヘッダを設定 • 例: 一度に大きなグループに対して設定を行う • /images/* or /*.jpg • オリジンに正しいクライアントIPアドレスを提供する • 例: オリジンが判断可能なヘッダ (True-Client-IP) に X-Forwarded- For をコピーする
31.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例: デバイスタイプごとのカスタマイズ クライアントリクエスト https://example.com/index.html • CloudFront-Is-Mobile-Viewer: true -> https://example.com/mobile/index.html • その他は全て https://example.com/desktop/index.html へリクエスト • コンテンツは高い確率でキャッシュ可能なため origin-request event でロジックを実行する • 正しくコンテンツをキャッシュするために、CloudFront-Is-Mobile-Viewer ヘッダーを転送する 設定を行う CloudF ront cache Origin Origin Request Viewer
32.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例: デバイスタイプごとのカスタマイズ exports.handler = (event, context, callback) => { const request = event.Records[0].cf.request; const headers = request.headers; /* Direct to a different part of the website based on * the device type */ const desktopPath = '/dektop’; Const mobilePath = '/mobile'; if (headers['cloudfront-is-desktop-viewer'] && headers['cloudfront-is-desktop-viewer'][0].value === 'true’) { request.uri = desktopPath + request.uri; } else if (headers['cloudfront-is-mobile-viewer'] && headers['cloudfront-is-mobile- viewer'][0].value === 'true') { request.uri = mobilePath + request.uri; } console.log(`Request uri set to "${request.uri}"`); callback(null, request); }
33.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. オリジンの動的な選択によるカスタマイズ • オリジン側で変更の公開を制御 • 新機能の A/B テスト • オリジンの Blue/Green デプロイ • 複数オリジンの設定 • レイテンシベース: Viewer(クライアント) に最も近いオリジンを選択 • 複数オリジン間でロードバランシング • オリジン間の移行 • オリジンの一部にオンプレミスを含み、徐々にクラウドに移行する • SEO: 検索エンジン最適化 • 実際のユーザーとクローラー用のトラフィックを別々のオリジンから提 供する
34.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. オリジンの選択 – A/B テスト 例: 新機能をテスト、新機能はオリジンの一方にのみデプロイされている 関数にて: 1. リクエストがアクティブセッションであるかを確認する (Cookie を使用) 2. アクティブセッションの場合は、 Cookie の値に基いてオリジンを設定する 3. 新しいセッションの場合は、A または B のどちらを表示するか決定し、オリジンを設定する CloudF ront cache Origin Request Viewer Origin B Origin A
35.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. オリジンの動的な選択 • オリジンはリクエストイベントの一部 として存在 • event.Records[0].cf.request.origin • 変更したオリジンはcallbackに返すリ クエストオブジェクトに含める "s3": { "domainName": "green-bucket.s3.amazonaws.com”, "path": "/originPath", "authMethod": "origin-access-identity", "region": "us-east-1", "customHeaders": { "my-custom-origin-header": [ { "key": "My-Custom-Origin-Header", "value": "test-value” } ] } }
36.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例 – A/B テスト exports.handler = (event, context, callback) => { const request = event.Records[0].cf.request; desiredOrigin = decide(request); /* Set custom origin fields*/ request.origin = { custom: { domainName: desiredOrigin, port: 443, protocol: 'https', } }; request.headers['host'] = [{ key: 'host', value: desiredOrigin }]; callback(null, request); }; function decide(request) { if (request.headers[‘my-session-cookie’]) { cookie = request.headers[‘my-session- cookie’].value; return decodeOrigin(cookie); } else { return chooseOrigin(request); } };
37.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. レスポンス生成 • Edge ロケーションでレスポンスを生成 • viewer-request または origin-request からレスポンスを返却 CloudFront cache Viewer Request Origin Origin Request Viewer • リクエストは Lambda@Edge で全て処理されるため、オリジンに到達しない
38.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. レスポンス生成 • Edge ロケーションでレスポンスを生成 • viewer-request または origin-request イベントで実行可能 • 関数内で全ての HTTP レスポンスを生成する • このレスポンスは callback に含める callback(null, response); • リクエストはオリジンに到達しない
39.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. レスポンス生成を使用したカスタマイズ • ヘッダのみ生成 • Redirect • 認証/認可に外部の source を利用 • ヘッダ / Body 生成 • サイト構成イメージなど高い確率でキャッシュ可能なコンテンツ • Viewer ごとにユニークなレスポンス • リクエスト入力を利用 • 例: 天気アプリ – ランディングページ • 表示地域のリストはユーザごとに異なり、リストがリクエストに含まれる • 地域ごとの天気情報は高い確率でキャッシュ可能 • リクエストに含まれない、ユーザー固有のデータを使用 • 例: 私の Prime Music ページ • 私のアルバムリスト • おすすめのプレイリスト • データストアから取得
40.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例 – Redirect • viewer-request または origin-request イベント • 未認証ユーザーをログインページにリダイレクト • viewer-request 関数で Cookie を検証 • Cookie が期限切れもしくは存在しない場合は、ログインページへリダ イレクト CloudFront cache Viewer Request Origin Origin Request Viewer
41.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例 – Redirect 'use strict'; exports.handler = (event, context, callback) => { /* * Generate HTTP redirect response with 302 status code and Location header. */ const response = { status: '302', statusDescription: 'Found', headers: { location: [{ key: 'Location', value: 'http://mydomain.com/login.html', }], }, }; callback(null, response); };
42.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例 – コンテンツ統合 例: 天気アプリのランディングページ クライアント: 各ユーザは表示地域のリストを持つ http://example.com/weather?cities=Seattle;NYC 関数にて: • URL のパース • 関連データの取得 • 統合されたレスポンスをクライアントアプリへ送信 CloudFront cache Viewer Request Origin Request Viewer
43.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例 – コンテンツ統合 function getCityForecast(request) { return new Promise((resolve, reject) => { https.get(request.uri, (response) => { let content = ''; response.setEncoding('utf8'); response.on('data', (chunk) => { content += chunk; }); response.on('end', () => resolve({ city: request.city, forecast: content })); }).on('error', e => reject(e)); }); } const uriSplit = uri.split('/'); const cities = uriSplit[2].split(':'); const forecasts = []; cities.forEach((cityName) => { const cityForecastUri = citiesBaseUri + cityName; forecasts.push({ city: cityName, uri: cityForecastUri }) });
44.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 例 – コンテンツ統合 Promise.all(forecasts.map(getCityForecast)).then((ret) => { console.log('Aggregating the responses:n', ret); const response = { status: '200', /* Status signals this is a generated response */ statusDescription: 'OK', headers: { 'content-type': [{ key: 'Content-Type', value: 'application/json', }], 'content-encoding': [{ key: 'Content-Encoding', value: 'UTF-8', }], }, body: JSON.stringify(ret, null, 't'), }; console.log('Generated response: ', JSON.stringify(response)); callback(null, response);
45.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 他にも Edge に移動できるものは? カスタマイズされた 動的コンテンツ (ロケーション) 動的なユーザーコンテンツ (パーソナライズ) 認証 動的コンテンツ (News feed) 静的コンテンツ (images,JS,CSS, …)
46.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. CloudFront + Lambda@Edge Origin AWS Location AWS Location AWS Location AWS Location AWS Location AWS Location
47.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. パーソナライズ • アイデンティティ: 認証 – カスタマが誰であるかを認識 • 情報: カスタマに関する知識 • 設定, 閲覧/購買履歴 … • アイデンティティと情報を組み合わせて、そのユーザに パーソナライズしたコンテンツを生成する
48.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 認証 このリクエストを処理するかどうかを決定する仕組み • 署名付き URL/Cookie を使用した認証 ( CloudFront の機能) • 認証 – Edge の関数で検証 • リモートサーバを使用した認証
49.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 関数のデータアクセス方法 • データをコードに含める • 使用およびアクセスが容易で高速 • 読み取り専用、デプロイパッケージの最大サイズに制限される、変更にはデプロ イが必要 • CloudFront キャッシュを使用 • 関数に近い (同じロケーションにある可能性が高い) 、TTL によって定期的にリ フレッシュされる • 読み取り専用 • AWS DB の利用 (DynamoDB 等) • 読み書き可能 • 関数から離れた一つのリージョンにデータが存在 • Amazon DynamoDB Global Tables • マルチリージョン、マルチマスタテーブル • 読み書き可能、関数に近いリージョンを利用
50.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. コンテンツ生成 – パーソナライズ 例: ユーザのログイン時に新しい「アイテム」をレコメンデーション Client: • https://example.com/index.html • ユーザはログイン済 関数: • DynamoDB からユーザの履歴と設定を取得 • 取得されたデータを使用してレスポンス生成 • 例: • 閲覧履歴に基づくニュース記事 • 視聴履歴に基づく音楽および映画のレコメンデーション • フォローしている人に基づくレコメンデーション CloudFront cache Viewer Request Origin Request Viewer
51.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. コンテンツ生成 – パーソナライズ /* Access DDB */ var aws = require('aws-sdk'); var ddb = new aws.DynamoDB().DocumentClient({apiVersion: '2012-10-08', region: 'us-east-1'}); /* Get the item based on the user */ function getItems(request, context, callback) { const params = { TableName: ”recommendations", Key: { ”User": { "S": user } } }; ddb.getItem(params, function(err, data) { if (err) { console.log(err, err.stack); generateErrorResponse(request, callback); } else { console.log("Received output from ddb: " + data) generateResponse(request, data, callback); } }); }
52.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. まとめ
53.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Serverless at the Edge カスタマイズされた 動的コンテンツ (ロケーション) 動的なユーザーコンテンツ (パーソナライズ) 認証 動的コンテンツ (News feed)静的コンテンツ (images,JS,CSS, …)
54.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Serverless at the Edge Origin AWS Location AWS Location AWS Location AWS Location AWS Location AWS Location
55.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. CloudFront イベントごとの機能 REQUEST RESPONSE VIEWER ORIGIN • Header 読み取り/書き込み • URL 読み取り/書き込み • クエリ文字列 読み取り/書き込み • Response 生成 • Network 呼び出し • Header 読み取り/書き込み • Request object 読み取り • Network 呼び出し • Header 読み取り/書き込み • URL 読み取り/書き込み • クエリ文字列 読み取り/書き込み • バイナリを含むResponse 生成 • Network 呼び出し • S3オリジン,カスタムオリジンの変更 • 関数タイムアウト 30 秒 • Header 読み取り/書き込み • Request object 読み取り • エラーステータス時の Response 更新 • Network 呼び出し • 関数タイムアウト 30 秒
56.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Lambda@Edge 用の Lambda 関数を作成 http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html#lambda-edge-how-it-works AWS Region US-East-1 Author at Lambda console Master Lambda function CloudFront distribution trigger AWS Region Lambda function replica AWS Region Lambda function replica CREATE ASSOCIATE REPLICATE REPLICATE CloudWatch CloudWatch ・ ・ ・
57.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Lambda@Edge 実行環境 Origin facing Viewer facing ランタイム Node.js 6.10 ← メモリ Lambdaと同じ (1,536MB) 128 MB 関数タイムアウト 30 秒 5 秒 Lambda 関数および組み込みライブラリの 最大圧縮サイズ 50 MB 1 MB レスポンスサイズ (request events) 1 MB 40 KB 同時実行数のデフォルト (Region毎) ※上限緩和可能 1,000 ← /tmp, 環境変数, DLQ, VPC 使⽤不可 ← http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html
58.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. 参考資料 全般 • CloudFront と Lambda@Edge の使 用 Page • 関数の例 Page • よくある質問 Page • 料金詳細 Page • AWS BlackBelt Online Seminar 2017 Amazon CloudFront Page • Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017 Slides / Video 関数のテストとデバッグ • Lambda 関数の CloudWatch メトリ クスと CloudWatch Logs Page • AWS X-Ray を使用した Lambda ベースのアプリケーションのト レース Page • SAM ローカルを使用してサー バーレスアプリケーションをロー カルでテストする(パブリックベー タ) Page
59.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ご参加ありがとうございました
60.
© 2018, Amazon
Web Services, Inc. or its Affiliates. All rights reserved.
Download