SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
Try to use chromeless on
AWS Lambda
@serima
25 Oct. 2018
Who am I?
Ryo Shibayama
Server Side Engineer
Working at GameWith Inc. (We're hiring! )
Twitter / GitHub : @serima
What's GameWith?
Let's get on track
chromeless
Runs locally or headless on AWS Lambda
It can be used to
Run 1000s of browser integration tests in parallel
Crawl the web & automate screenshots
Write bots that require a real browser
https://github.com/graphcool/chromeless
Two operation modes
This time I will introduce Remote Proxy mode
Setup ow
1. Clone chromeless repo, npm install in proxy
service directory
2. Con gure AWS's access key and secret
3. Deploy to own infrastructure with dedicated
command( npm run deploy )
4. Request to the proxy using issued endpoint, API
key
Notice: Use the same region between AWS
services chromeless uses
Deployed Lambda Functions
We can see that the four functions have been deployed
Then Let's request to
Lambda functions!
const Chromeless = require('chromeless').default
async function run(url) {
const chromeless = new Chromeless({
remote: {
endpointUrl: 'https://xxxxx.execute-api.ap-northeast-1.ama
apiKey: 'xxxxxxxxxxxx'
},
})
const screenshot = await chromeless
.setUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like M
.setViewport({width: 640, height: 1136, scale: 1})
.goto(url)
.screenshot()
console.log(url)
console.log(screenshot) // prints S3 url
await chromeless.end()
}
run('https://www.yahoo.co.jp').catch(console.error.bind(console
run('https://www.facebook.com').catch(console.error.bind(console
Run
% node test.js
https://www.yahoo.co.jp
https://xxxxx-ap-northeast-1-chromeless.s3.amazonaws.com/cj946gj
https://www.facebook.com
https://xxxxx-ap-northeast-1-chromeless.s3.amazonaws.com/cj946gk
Retured S3 urls(they are screen captures)
uh-oh
Why □?
chromeless depends on severless-chrome
By default, some fonts are not installed in
serverless-chrome
#49 Include Chinese/Japanese/Korean/more
fonts in headless Chrome binary
Rendered successfully
Because yahoo.com only uses English
Missing fonts...
But we can resolve this issue to re-archive
serverless-chrome with fontcon g bundled
My former senior was writing a blog about this
issue
Hmm
It's better to wait for serverless-chrome supports
multi fonts con guration
Because chromeless depends on it...
If we use serverless-chrome as standalone, I think
we should install and use our own fonts
Conclusion
The approach of explosively increasing the
number of parallels using Lambda is very
interesting
Keep watching these repos
More in details on my blog serima.co/blog
Bonus
PhantomJS: Stepping down as maintainer
https://news.ycombinator.com/item?
id=14105489
We should choose headless chrome as an e2e test
tool from now on
Thank you for listening

Mais conteúdo relacionado

Mais procurados

[Jun AWS 201] Elastic Beanstalk for Startups
[Jun AWS 201] Elastic Beanstalk for Startups[Jun AWS 201] Elastic Beanstalk for Startups
[Jun AWS 201] Elastic Beanstalk for Startups
Amazon Web Services Korea
 

Mais procurados (20)

Introduction to AWS Device Farm
Introduction to AWS Device FarmIntroduction to AWS Device Farm
Introduction to AWS Device Farm
 
The tale of 100 cve's
The tale of 100 cve'sThe tale of 100 cve's
The tale of 100 cve's
 
(GAM405) Create Streaming Game Experiences with Amazon AppStream | AWS re:Inv...
(GAM405) Create Streaming Game Experiences with Amazon AppStream | AWS re:Inv...(GAM405) Create Streaming Game Experiences with Amazon AppStream | AWS re:Inv...
(GAM405) Create Streaming Game Experiences with Amazon AppStream | AWS re:Inv...
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
 
Async webdriverjs
Async webdriverjsAsync webdriverjs
Async webdriverjs
 
Selenium and Sauce Labs
Selenium and Sauce LabsSelenium and Sauce Labs
Selenium and Sauce Labs
 
Visual Studio Online as a CI Service
Visual Studio Online as a CI ServiceVisual Studio Online as a CI Service
Visual Studio Online as a CI Service
 
Automated Infrastructure Security: Monitoring using FOSS
Automated Infrastructure Security: Monitoring using FOSSAutomated Infrastructure Security: Monitoring using FOSS
Automated Infrastructure Security: Monitoring using FOSS
 
Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016
 
Selenium-Grid-Extras
Selenium-Grid-ExtrasSelenium-Grid-Extras
Selenium-Grid-Extras
 
Sauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFS
 
[Jun AWS 201] Elastic Beanstalk for Startups
[Jun AWS 201] Elastic Beanstalk for Startups[Jun AWS 201] Elastic Beanstalk for Startups
[Jun AWS 201] Elastic Beanstalk for Startups
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWS
 
Amazon Web Services for the .NET Developer
Amazon Web Services for the .NET DeveloperAmazon Web Services for the .NET Developer
Amazon Web Services for the .NET Developer
 
AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...
AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...
AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...
 
Prepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/GreenPrepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/Green
 
Composer
ComposerComposer
Composer
 
Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe
 
Large web applications development
Large web applications developmentLarge web applications development
Large web applications development
 

Semelhante a Try to use chromeless on AWS Lambda

SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure FunctionsSharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
Sébastien Levert
 

Semelhante a Try to use chromeless on AWS Lambda (20)

Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
 
Cypress.docx
Cypress.docxCypress.docx
Cypress.docx
 
DJUGL - Django and AWS Lambda
DJUGL - Django and AWS LambdaDJUGL - Django and AWS Lambda
DJUGL - Django and AWS Lambda
 
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generatorsDEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
 
Future of Serverless
Future of ServerlessFuture of Serverless
Future of Serverless
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
 
Devops on serverless
Devops on serverlessDevops on serverless
Devops on serverless
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
 
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
 
Fine Uploader S3
Fine Uploader S3Fine Uploader S3
Fine Uploader S3
 
Web20expo 20080425
Web20expo 20080425Web20expo 20080425
Web20expo 20080425
 
Building Advanced Serverless Workflows with AWS Step Functions | AWS Floor28
Building Advanced Serverless Workflows with AWS Step Functions | AWS Floor28Building Advanced Serverless Workflows with AWS Step Functions | AWS Floor28
Building Advanced Serverless Workflows with AWS Step Functions | AWS Floor28
 
SocketStream
SocketStreamSocketStream
SocketStream
 
CSS Regression Tests
CSS Regression TestsCSS Regression Tests
CSS Regression Tests
 
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure FunctionsSharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
SharePoint Fest Seattle - SharePoint Framework, Angular & Azure Functions
 
Chalice microframework 101 (eng)
Chalice microframework 101 (eng)Chalice microframework 101 (eng)
Chalice microframework 101 (eng)
 
Sanjeev ghai 12
Sanjeev ghai 12Sanjeev ghai 12
Sanjeev ghai 12
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
 
Oscon 20080724
Oscon 20080724Oscon 20080724
Oscon 20080724
 

Mais de Ryo Shibayama

Mais de Ryo Shibayama (13)

倒れても進捗
倒れても進捗倒れても進捗
倒れても進捗
 
CircleCI 導入への入門
CircleCI 導入への入門CircleCI 導入への入門
CircleCI 導入への入門
 
エンジニア採用と PHP #phpconfuk_rej
エンジニア採用と PHP #phpconfuk_rejエンジニア採用と PHP #phpconfuk_rej
エンジニア採用と PHP #phpconfuk_rej
 
Start OSS Contribution With What You Know / できることから始める OSS Contribution
Start OSS Contribution With What You Know / できることから始める OSS ContributionStart OSS Contribution With What You Know / できることから始める OSS Contribution
Start OSS Contribution With What You Know / できることから始める OSS Contribution
 
チームから気軽に始めるピアボーナス
チームから気軽に始めるピアボーナスチームから気軽に始めるピアボーナス
チームから気軽に始めるピアボーナス
 
ソフトウェアエンジニアとしてのワークアズライフ
ソフトウェアエンジニアとしてのワークアズライフソフトウェアエンジニアとしてのワークアズライフ
ソフトウェアエンジニアとしてのワークアズライフ
 
CircleCI 2.0 でビルド時間を大幅に短縮する
CircleCI 2.0 でビルド時間を大幅に短縮するCircleCI 2.0 でビルド時間を大幅に短縮する
CircleCI 2.0 でビルド時間を大幅に短縮する
 
OSS Contribution through CircleCI 2.0
OSS Contribution through CircleCI 2.0OSS Contribution through CircleCI 2.0
OSS Contribution through CircleCI 2.0
 
PHP-MLを使用して気軽に機械学習にトライしてみる
PHP-MLを使用して気軽に機械学習にトライしてみるPHP-MLを使用して気軽に機械学習にトライしてみる
PHP-MLを使用して気軽に機械学習にトライしてみる
 
Carbon と Chronos から見る OSS 運営
Carbon と Chronos から見る OSS 運営Carbon と Chronos から見る OSS 運営
Carbon と Chronos から見る OSS 運営
 
WordPress on PHP7 on CentOS7 on Saraku-VPS
WordPress on PHP7 on CentOS7 on Saraku-VPSWordPress on PHP7 on CentOS7 on Saraku-VPS
WordPress on PHP7 on CentOS7 on Saraku-VPS
 
Security Advisories Checker on Travis/Circle CI
Security Advisories Checker on Travis/Circle CISecurity Advisories Checker on Travis/Circle CI
Security Advisories Checker on Travis/Circle CI
 
第87回PHP勉強会 LT 知って得するかもしれないテキスト処理コマンドのお話
第87回PHP勉強会 LT 知って得するかもしれないテキスト処理コマンドのお話第87回PHP勉強会 LT 知って得するかもしれないテキスト処理コマンドのお話
第87回PHP勉強会 LT 知って得するかもしれないテキスト処理コマンドのお話
 

Último

₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
Diya Sharma
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ellan12
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
imonikaupta
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 

Último (20)

WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 

Try to use chromeless on AWS Lambda