SlideShare a Scribd company logo
1 of 17
Download to read offline
Copyright © CKmates. All rights reserved
AWS Lambda
Hans
1
機密等級:公開
Copyright © CKmates. All rights reserved
Agenda
2
如何用Python撰寫AWS Lambda
Lambda Introduction
Lab
應用案例
Copyright © CKmates. All rights reserved
Lambda Introduction
3
Copyright © CKmates. All rights reserved
Lambda Introduction
4
Copyright © CKmates. All rights reserved
Lambda Introduction
5
Copyright © CKmates. All rights reserved
Lambda Introduction
• 只用上傳程式碼,不需要管理伺服器
• 根據使用次數跟運算時間來計費
• 根據事件驅動執行
• 每次驅動最多只能執行5分鐘(300秒)
• 支援語言 : Node.js, Java, C# and
Python
• GO maybe next year (2018) 6
Copyright © CKmates. All rights reserved
只用上傳程式碼,不需要管理伺服器
• 內建高可用性(HA),不用擔心伺服器突然發生意
外
• 可以根據使用量擴展,不用考慮機器要怎麼擴展
((預設同一個Region可以同時執行100個
Lambda Function (但可以申請提高))
• 計算資源規格根據記憶體分配對應的CPU資源
記憶體大小在128 MB 到 3 GB (2017 Re:Invent)
256MB的運算資源大約是128 MB的運算資源的
兩倍
7
Copyright © CKmates. All rights reserved
只用上傳程式碼,不需要管理伺服器(續)
• 架構其實就是容器(container),
專門放上傳的程式碼執行
• 背後運行架構流程範例
根據AWS定的規格上傳程式碼 -> AWS
的某台機器開啟容器 -> 放入程式碼執行
8
Copyright © CKmates. All rights reserved
只從使用次數跟運算時間來計費
•AWS Lambda 免費方案
每個月前100萬次執行免費
免費運算時間320萬秒到26萬秒不等
•計價公式 : 運算費用(運算時間跟選用的
記憶體) + 請求費用 (使用次數)
9
Copyright © CKmates. All rights reserved
根據事件驅動執行
•事件驅動的來源
– AWS S3 儲存空間放入一個檔案就執行
– 每天早上七點執行 (定期執行)
可以透過排程設定
– AWS其他常見案例服務如 :
API Gateway 提供網址可以觸發Lambda查詢資料庫後回傳結果
10
Copyright © CKmates. All rights reserved
每次驅動最多只能執行5分鐘(300秒)
•應用場景適合不用複雜計算的程式,
因為只有300秒的運算時間
•可以設定逾時,因為AWS Lambda
從3到300秒,
建議必須估計好完成工作的時間,
逾時的秒數一到,
AWS Lambda會自動停止
11
Copyright © CKmates. All rights reserved
如何用Python撰寫AWS Lambda
•handler : 主要用來執行程式的地方
•範例
def my_handler(event, context):
message = 'Hello {}
{}!'.format(event['first_name'],
event['last_name'])
return {
'message' : message
} 12
Copyright © CKmates. All rights reserved
應用案例
•攝影裝置定時拍照上傳到雲端空間S3,
驅動Lambda進行臉部識別偵測,
將含有人臉的照片,發佈在網頁上
13
Copyright © CKmates. All rights reserved
應用案例 - 可口可樂
• 消費者 -> 會員卡或信用卡 -> 自動販賣機 -> 支付閘道 ->
Amazon API Gateway ->AWS Lambda -> Apple Pay or Android Pay
• 原本邏輯 EC2 -> Lambda
節省65%成本
14
Copyright © CKmates. All rights reserved
Lab 練習利用AWS Lambda操作S3物件
•目的 : 將檔案放入S3某個bucket的同時,使用Lambda將此
份檔案備份一份到另一個bucket並更改檔案名稱後面加上
123。
•範例流程 : 上傳1這個檔案到s3的mytest-bucket 路徑為
s3://mytest-bucket/1
AWS Lambda會因為這個動作驅動,從原本的s3
路徑複製另外一份檔 案到s3://mytest-bucket-
copy/1123
•可以使用QWIKLABS快速免費測試
https://qwiklabs.com/
•GitHub
https://github.com/ogckw/aws_lambda_backup_s3
15
Copyright © CKmates. All rights reserved
Demo
16
Copyright © CKmates. All rights reserved
Thanks
Q & A
hans.hsu@ckmates.com
17

More Related Content

What's hot

Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon Web Services
 
Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 GamingAurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 GamingAmazon Web Services Korea
 
Azure DNS Privé
Azure DNS PrivéAzure DNS Privé
Azure DNS PrivéAZUG FR
 
How a Global Healthcare Company Built a Migration Factory to Quickly Move Tho...
How a Global Healthcare Company Built a Migration Factory to Quickly Move Tho...How a Global Healthcare Company Built a Migration Factory to Quickly Move Tho...
How a Global Healthcare Company Built a Migration Factory to Quickly Move Tho...Amazon Web Services
 
AWS SAMで始めるサーバーレスアプリケーション開発
AWS SAMで始めるサーバーレスアプリケーション開発AWS SAMで始めるサーバーレスアプリケーション開発
AWS SAMで始めるサーバーレスアプリケーション開発真吾 吉田
 
Getting Started with AWS Database Migration Service
Getting Started with AWS Database Migration ServiceGetting Started with AWS Database Migration Service
Getting Started with AWS Database Migration ServiceAmazon Web Services
 
AWS Black Belt Online Seminar 2016 クラウドのためのアーキテクチャ設計 -ベストプラクティス-
AWS Black Belt Online Seminar 2016 クラウドのためのアーキテクチャ設計 -ベストプラクティス-AWS Black Belt Online Seminar 2016 クラウドのためのアーキテクチャ設計 -ベストプラクティス-
AWS Black Belt Online Seminar 2016 クラウドのためのアーキテクチャ設計 -ベストプラクティス-Amazon Web Services Japan
 
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatchAmazon Web Services Japan
 
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)Amazon Web Services Japan
 
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...Amazon Web Services Korea
 
Serverless Architecture - Design Patterns and Best Practices
Serverless Architecture - Design Patterns and Best PracticesServerless Architecture - Design Patterns and Best Practices
Serverless Architecture - Design Patterns and Best PracticesAmazon Web Services
 
AWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAmazon Web Services
 
How to Set Up a Cloud Cost Optimization Process for your Enterprise
How to Set Up a Cloud Cost Optimization Process for your EnterpriseHow to Set Up a Cloud Cost Optimization Process for your Enterprise
How to Set Up a Cloud Cost Optimization Process for your EnterpriseRightScale
 
Serverless Framework Intro
Serverless Framework IntroServerless Framework Intro
Serverless Framework IntroNikolaus Graf
 
Aws organizations
Aws organizationsAws organizations
Aws organizationsOlaf Conijn
 
ABCs of AWS: S3
ABCs of AWS: S3ABCs of AWS: S3
ABCs of AWS: S3Mark Cohen
 

What's hot (20)

Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
 
Amazon Aurora: Under the Hood
Amazon Aurora: Under the HoodAmazon Aurora: Under the Hood
Amazon Aurora: Under the Hood
 
Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 GamingAurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
 
Azure DNS Privé
Azure DNS PrivéAzure DNS Privé
Azure DNS Privé
 
How a Global Healthcare Company Built a Migration Factory to Quickly Move Tho...
How a Global Healthcare Company Built a Migration Factory to Quickly Move Tho...How a Global Healthcare Company Built a Migration Factory to Quickly Move Tho...
How a Global Healthcare Company Built a Migration Factory to Quickly Move Tho...
 
AWS SAMで始めるサーバーレスアプリケーション開発
AWS SAMで始めるサーバーレスアプリケーション開発AWS SAMで始めるサーバーレスアプリケーション開発
AWS SAMで始めるサーバーレスアプリケーション開発
 
Getting Started with AWS Database Migration Service
Getting Started with AWS Database Migration ServiceGetting Started with AWS Database Migration Service
Getting Started with AWS Database Migration Service
 
AWS Black Belt Online Seminar 2016 クラウドのためのアーキテクチャ設計 -ベストプラクティス-
AWS Black Belt Online Seminar 2016 クラウドのためのアーキテクチャ設計 -ベストプラクティス-AWS Black Belt Online Seminar 2016 クラウドのためのアーキテクチャ設計 -ベストプラクティス-
AWS Black Belt Online Seminar 2016 クラウドのためのアーキテクチャ設計 -ベストプラクティス-
 
AWS Security Best Practices
AWS Security Best PracticesAWS Security Best Practices
AWS Security Best Practices
 
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch20190326 AWS Black Belt Online Seminar Amazon CloudWatch
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
 
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)
 
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
 
Serverless Architecture - Design Patterns and Best Practices
Serverless Architecture - Design Patterns and Best PracticesServerless Architecture - Design Patterns and Best Practices
Serverless Architecture - Design Patterns and Best Practices
 
AWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best PracticesAWS Multi-Account Architecture and Best Practices
AWS Multi-Account Architecture and Best Practices
 
How to Set Up a Cloud Cost Optimization Process for your Enterprise
How to Set Up a Cloud Cost Optimization Process for your EnterpriseHow to Set Up a Cloud Cost Optimization Process for your Enterprise
How to Set Up a Cloud Cost Optimization Process for your Enterprise
 
Auto Scaling on AWS
Auto Scaling on AWSAuto Scaling on AWS
Auto Scaling on AWS
 
Serverless Framework Intro
Serverless Framework IntroServerless Framework Intro
Serverless Framework Intro
 
Aws organizations
Aws organizationsAws organizations
Aws organizations
 
AWS EC2 and ELB troubleshooting
AWS EC2 and ELB troubleshootingAWS EC2 and ELB troubleshooting
AWS EC2 and ELB troubleshooting
 
ABCs of AWS: S3
ABCs of AWS: S3ABCs of AWS: S3
ABCs of AWS: S3
 

Similar to AWS lambda

CKmates - AWS 雲端運算 基礎服務介紹
CKmates - AWS 雲端運算 基礎服務介紹CKmates - AWS 雲端運算 基礎服務介紹
CKmates - AWS 雲端運算 基礎服務介紹均民 戴
 
Open whisk makes your cloud serverless 20180320
Open whisk makes your cloud serverless 20180320Open whisk makes your cloud serverless 20180320
Open whisk makes your cloud serverless 20180320Ying Chun Guo
 
Getting Started with Serverless Architecture - 深入淺出無伺服器架構應用程式
Getting Started with Serverless Architecture - 深入淺出無伺服器架構應用程式Getting Started with Serverless Architecture - 深入淺出無伺服器架構應用程式
Getting Started with Serverless Architecture - 深入淺出無伺服器架構應用程式Amazon Web Services
 
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用均民 戴
 
網路技術心得分享
網路技術心得分享網路技術心得分享
網路技術心得分享Mux Baxer
 
Nodejs & NAE
Nodejs & NAENodejs & NAE
Nodejs & NAEq3boy
 
AWS_Educate_NTU_Rekognition_Analysis_S3_Image.pptx
AWS_Educate_NTU_Rekognition_Analysis_S3_Image.pptxAWS_Educate_NTU_Rekognition_Analysis_S3_Image.pptx
AWS_Educate_NTU_Rekognition_Analysis_S3_Image.pptx土撥 JIE
 
雲端分散架構的駭客事件與安全問題
雲端分散架構的駭客事件與安全問題雲端分散架構的駭客事件與安全問題
雲端分散架構的駭客事件與安全問題Alan Lee
 
Paas研究介绍
Paas研究介绍Paas研究介绍
Paas研究介绍snakebbf
 
一次搞懂雲端資安,同步傳授資安絕招
一次搞懂雲端資安,同步傳授資安絕招一次搞懂雲端資安,同步傳授資安絕招
一次搞懂雲端資安,同步傳授資安絕招Amazon Web Services
 
客戶常見問題分享與解決
客戶常見問題分享與解決客戶常見問題分享與解決
客戶常見問題分享與解決Amazon Web Services
 
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)涛 吴
 
Software Engineer Talk
Software Engineer TalkSoftware Engineer Talk
Software Engineer TalkLarry Cai
 
lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用hugo
 
阿里云技术实践
阿里云技术实践阿里云技术实践
阿里云技术实践drewz lin
 
AWS 雲端環境的資安佈局.pdf
AWS 雲端環境的資安佈局.pdfAWS 雲端環境的資安佈局.pdf
AWS 雲端環境的資安佈局.pdfssuser293781
 

Similar to AWS lambda (20)

CKmates - AWS 雲端運算 基礎服務介紹
CKmates - AWS 雲端運算 基礎服務介紹CKmates - AWS 雲端運算 基礎服務介紹
CKmates - AWS 雲端運算 基礎服務介紹
 
AWS入門
AWS入門AWS入門
AWS入門
 
Open whisk makes your cloud serverless 20180320
Open whisk makes your cloud serverless 20180320Open whisk makes your cloud serverless 20180320
Open whisk makes your cloud serverless 20180320
 
Getting Started with Serverless Architecture - 深入淺出無伺服器架構應用程式
Getting Started with Serverless Architecture - 深入淺出無伺服器架構應用程式Getting Started with Serverless Architecture - 深入淺出無伺服器架構應用程式
Getting Started with Serverless Architecture - 深入淺出無伺服器架構應用程式
 
Databases on AWS
Databases on AWSDatabases on AWS
Databases on AWS
 
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用
 
網路技術心得分享
網路技術心得分享網路技術心得分享
網路技術心得分享
 
Nodejs & NAE
Nodejs & NAENodejs & NAE
Nodejs & NAE
 
AWS_Educate_NTU_Rekognition_Analysis_S3_Image.pptx
AWS_Educate_NTU_Rekognition_Analysis_S3_Image.pptxAWS_Educate_NTU_Rekognition_Analysis_S3_Image.pptx
AWS_Educate_NTU_Rekognition_Analysis_S3_Image.pptx
 
雲端分散架構的駭客事件與安全問題
雲端分散架構的駭客事件與安全問題雲端分散架構的駭客事件與安全問題
雲端分散架構的駭客事件與安全問題
 
Paas研究介绍
Paas研究介绍Paas研究介绍
Paas研究介绍
 
一次搞懂雲端資安,同步傳授資安絕招
一次搞懂雲端資安,同步傳授資安絕招一次搞懂雲端資安,同步傳授資安絕招
一次搞懂雲端資安,同步傳授資安絕招
 
客戶常見問題分享與解決
客戶常見問題分享與解決客戶常見問題分享與解決
客戶常見問題分享與解決
 
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
 
Software Engineer Talk
Software Engineer TalkSoftware Engineer Talk
Software Engineer Talk
 
lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用
 
Hacmp5.x
Hacmp5.xHacmp5.x
Hacmp5.x
 
Serverless 網站監控
Serverless 網站監控Serverless 網站監控
Serverless 網站監控
 
阿里云技术实践
阿里云技术实践阿里云技术实践
阿里云技术实践
 
AWS 雲端環境的資安佈局.pdf
AWS 雲端環境的資安佈局.pdfAWS 雲端環境的資安佈局.pdf
AWS 雲端環境的資安佈局.pdf
 

AWS lambda

  • 1. Copyright © CKmates. All rights reserved AWS Lambda Hans 1 機密等級:公開
  • 2. Copyright © CKmates. All rights reserved Agenda 2 如何用Python撰寫AWS Lambda Lambda Introduction Lab 應用案例
  • 3. Copyright © CKmates. All rights reserved Lambda Introduction 3
  • 4. Copyright © CKmates. All rights reserved Lambda Introduction 4
  • 5. Copyright © CKmates. All rights reserved Lambda Introduction 5
  • 6. Copyright © CKmates. All rights reserved Lambda Introduction • 只用上傳程式碼,不需要管理伺服器 • 根據使用次數跟運算時間來計費 • 根據事件驅動執行 • 每次驅動最多只能執行5分鐘(300秒) • 支援語言 : Node.js, Java, C# and Python • GO maybe next year (2018) 6
  • 7. Copyright © CKmates. All rights reserved 只用上傳程式碼,不需要管理伺服器 • 內建高可用性(HA),不用擔心伺服器突然發生意 外 • 可以根據使用量擴展,不用考慮機器要怎麼擴展 ((預設同一個Region可以同時執行100個 Lambda Function (但可以申請提高)) • 計算資源規格根據記憶體分配對應的CPU資源 記憶體大小在128 MB 到 3 GB (2017 Re:Invent) 256MB的運算資源大約是128 MB的運算資源的 兩倍 7
  • 8. Copyright © CKmates. All rights reserved 只用上傳程式碼,不需要管理伺服器(續) • 架構其實就是容器(container), 專門放上傳的程式碼執行 • 背後運行架構流程範例 根據AWS定的規格上傳程式碼 -> AWS 的某台機器開啟容器 -> 放入程式碼執行 8
  • 9. Copyright © CKmates. All rights reserved 只從使用次數跟運算時間來計費 •AWS Lambda 免費方案 每個月前100萬次執行免費 免費運算時間320萬秒到26萬秒不等 •計價公式 : 運算費用(運算時間跟選用的 記憶體) + 請求費用 (使用次數) 9
  • 10. Copyright © CKmates. All rights reserved 根據事件驅動執行 •事件驅動的來源 – AWS S3 儲存空間放入一個檔案就執行 – 每天早上七點執行 (定期執行) 可以透過排程設定 – AWS其他常見案例服務如 : API Gateway 提供網址可以觸發Lambda查詢資料庫後回傳結果 10
  • 11. Copyright © CKmates. All rights reserved 每次驅動最多只能執行5分鐘(300秒) •應用場景適合不用複雜計算的程式, 因為只有300秒的運算時間 •可以設定逾時,因為AWS Lambda 從3到300秒, 建議必須估計好完成工作的時間, 逾時的秒數一到, AWS Lambda會自動停止 11
  • 12. Copyright © CKmates. All rights reserved 如何用Python撰寫AWS Lambda •handler : 主要用來執行程式的地方 •範例 def my_handler(event, context): message = 'Hello {} {}!'.format(event['first_name'], event['last_name']) return { 'message' : message } 12
  • 13. Copyright © CKmates. All rights reserved 應用案例 •攝影裝置定時拍照上傳到雲端空間S3, 驅動Lambda進行臉部識別偵測, 將含有人臉的照片,發佈在網頁上 13
  • 14. Copyright © CKmates. All rights reserved 應用案例 - 可口可樂 • 消費者 -> 會員卡或信用卡 -> 自動販賣機 -> 支付閘道 -> Amazon API Gateway ->AWS Lambda -> Apple Pay or Android Pay • 原本邏輯 EC2 -> Lambda 節省65%成本 14
  • 15. Copyright © CKmates. All rights reserved Lab 練習利用AWS Lambda操作S3物件 •目的 : 將檔案放入S3某個bucket的同時,使用Lambda將此 份檔案備份一份到另一個bucket並更改檔案名稱後面加上 123。 •範例流程 : 上傳1這個檔案到s3的mytest-bucket 路徑為 s3://mytest-bucket/1 AWS Lambda會因為這個動作驅動,從原本的s3 路徑複製另外一份檔 案到s3://mytest-bucket- copy/1123 •可以使用QWIKLABS快速免費測試 https://qwiklabs.com/ •GitHub https://github.com/ogckw/aws_lambda_backup_s3 15
  • 16. Copyright © CKmates. All rights reserved Demo 16
  • 17. Copyright © CKmates. All rights reserved Thanks Q & A hans.hsu@ckmates.com 17