SlideShare une entreprise Scribd logo
1  sur  29
Perl and Amazon Web
Services
London Perl Workshop 2019
1
Introduction
In this talk I will
● give a very short introduction to cloud computing in general
● introduce a few AWS resources (CloudFormation, EC2, S3, Lambda)
● demonstrate running Perl on an EC2 instance
● demonstrate using AWS::Lambda to create a Perl runtime for AWS Lambda
2
But, first
About me:
● My name is Søren Lund and I’m from Denmark
● I’ve been a SW developer for more than twenty years
● I’ve used many programming languages (C/C++, Perl, Java, JavaScript, …)
● I’ve also worked a lot with build automation, CI/CD and automated tests
● I’ve worked as a AWS consultant for the last couple of years
3
Disclaimer
● I’ve no experience running Perl on AWS!
However,
● I know Perl
● I know AWS
Or, as the meme goes
● “Trust Me, I’m an Engineer”
4
Cloud Computing
5
Cloud Computing
“Cloud computing is the on-demand availability of computer system
resources, especially data storage and computing power, without direct active
management by the user.”
“Cloud computing was popularized with Amazon.com releasing its Elastic
Compute Cloud product in 2006.”
From https://en.wikipedia.org/wiki/Cloud_computing
6
Service Models
● Infrastructure as a service (IaaS)
● Platform as a service (PaaS)
● Software as a service (SaaS)
● Serverless computing
● Function as a service (FaaS)
7
Infrastructure as a service (IaaS)
“...online services that provide high-level APIs used to dereference various low-
level details of underlying network infrastructure like physical computing
resources, location, data partitioning, scaling, security, backup etc.”
From https://en.wikipedia.org/wiki/Infrastructure_as_a_service
8
Function as a service (FaaS)
“...category of cloud computing services that provides a platform allowing
customers to develop, run, and manage application functionalities without the
complexity of building and maintaining the infrastructure typically associated with
developing and launching an app.”
From https://en.wikipedia.org/wiki/Function_as_a_service
9
Amazon Web Services
10
Amazon Web Service (AWS)
● From 2000 to 2005 Amazon.com works on infrastructure
● AWS is launched on March 19 2006, first service is Amazon S3 (Simple
Storage Service)
● Amazon SQS (Simple Queue Service) follows on July 13
● And on August 25 Amazon EC2 (Elastic Compute Cloud) is launched
From https://en.wikipedia.org/wiki/Timeline_of_Amazon_Web_Services
11
AWS now has many more services
“...137 top level services spread across 23 categories… many of these top level
services further expand into multiple sub services” (January 2019)
From https://www.quora.com/How-many-AWS-services-are-there
See https://aws.amazon.com/products/
12
Getting started with AWS
Sign up at https://aws.amazon.com/
Free tier: https://aws.amazon.com/free/
● Always free - e.g. 1 million free requests on AWS Lambda every month
● 12 month free - e.g. 750 hours EC2 t2.micro instance usage every month
● Trials - e.g. 250 device minutes on AWS Device Farm
13
AWS Management Console
From the “Console” you can create/modify/maintain/destroy resources.
See https://console.aws.amazon.com/console/home
14
Launching an EC2 instance from the Console
15
AWS CLI
The AWS CLI is a uber command “aws”, that can be used to manage your AWS
resources and services.
● Written in Python (pip install awscli)
● Enables you to write scripts that creates/modifies/maintains/destroys
resources
● You need to create credentials (tokens) in the Console to use the CLI
See https://aws.amazon.com/cli/
16
AWS SDKs
Official SDKs providing APIs for AWS services are available in
● JavaScript
● Python
● PHP
● .NET
● Ruby
● Java
● Go
● Node.js
● C++
See https://aws.amazon.com/tools/
Image by Jonny
Lindner from Pixabay
?
17
Paws
● Perl SDK for AWS
● Built by automatically converting Python code into Perl code
● Also includes CLI (paws)
● https://metacpan.org/pod/Paws
18
Image by Jonny
Lindner from Pixabay
❤
AWS CloudFormation
● Infrastructure as code
● Define resources in templates (JSON or YAML) or visual designer
● Deploy template using CloudFormation using the Consol, CLI or API
● A deployed template is called a Stack
19
Basic Anatomy of a CloudFormation Template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "",
"Parameters" : { },
"Resources" : { },
"Outputs" : { }
}
See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
20
Running Perl on an EC2 instance
21
Creating a CloudFormation Templates
AWS has lots of examples and snippets.
● Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-sample-templates.html
● Snippets: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/CHAP_TemplateQuickRef.html
There’s also a linter for CloudFormation Templates:
● See https://github.com/aws-cloudformation/cfn-python-lint
22
Amazon EC2
● EC2 provides generic computer virtualization
● When using EC2 you will boot an Amazon Machine Image (AMI) to create a
running machine, called an instance
● Amazon maintains an AMI called Amazon Linux based on CentOS
○ version 1 has Perl 5.16.3
○ version 2 has no Perl
● Run it locally: docker run -it amazonlinux bash
23
User Data in EC2 CloudFormation templates
"UserData": {
"Fn::Base64": {
"Fn::Join": [
"", [
"#!/bin/bashn",
"curl -L http://cpanmin.us | perl - --self-upgraden",
"cpanm Acme::Be::Modernn"
]]
}
}
24
Demo time
Code is available on GitHub.
See https://github.com/soren/perl-and-aws
25
AWS::Lambda
26
AWS Lambda
“...an event-driven, serverless computing platform provided by Amazon as a part
of the Amazon Web Services. It is a computing service that runs code in response
to events and automatically manages the computing resources required by that
code. It was introduced in November 2014.”
From https://en.wikipedia.org/wiki/AWS_Lambda
27
Console demo
28
Using the AWS Lambda runtime provided by
● https://metacpan.org/pod/AWS::Lambda
To execute the following:
sub handle {
my ($payload, $context) = @_;
my $result = encode_json("Hello from Perl!");
return +{ statusCode => 200, body => $result };
}
The End… Questions?
29

Contenu connexe

Tendances

Amazon ECS (March 2016)
Amazon ECS (March 2016)Amazon ECS (March 2016)
Amazon ECS (March 2016)Julien SIMON
 
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
Scaling your web app  horizontally and vertically (ahmedabad amazon aws cloud...Scaling your web app  horizontally and vertically (ahmedabad amazon aws cloud...
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...Jhalak Modi
 
AWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAnton Babenko
 
Meeyup aws-loadbalancing-28032015
Meeyup aws-loadbalancing-28032015Meeyup aws-loadbalancing-28032015
Meeyup aws-loadbalancing-28032015Jhalak Modi
 
Building serverless apps with Node.js
Building serverless apps with Node.jsBuilding serverless apps with Node.js
Building serverless apps with Node.jsJulien SIMON
 
Building A Dynamic Website - 31st Jan 2015
Building A Dynamic Website - 31st Jan 2015Building A Dynamic Website - 31st Jan 2015
Building A Dynamic Website - 31st Jan 2015Jhalak Modi
 
How to copy multiple files from local to aws s3 bucket using aws cli
How to copy multiple files from local to aws s3 bucket using aws cliHow to copy multiple files from local to aws s3 bucket using aws cli
How to copy multiple files from local to aws s3 bucket using aws cliKaty Slemon
 
Aws meetup building_lambda
Aws meetup building_lambdaAws meetup building_lambda
Aws meetup building_lambdaAdam Book
 
Deploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkDeploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkJulien SIMON
 
20190406 LT(笹亀)
20190406 LT(笹亀)20190406 LT(笹亀)
20190406 LT(笹亀)ssuseraa32c9
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWSAnton Babenko
 
Artem Zhurbila 5 aws - cloud formation and beanstalk
Artem Zhurbila 5 aws - cloud formation and beanstalkArtem Zhurbila 5 aws - cloud formation and beanstalk
Artem Zhurbila 5 aws - cloud formation and beanstalkArtem Zhurbila
 
Cloud Academy's AWS Hands on-labs
Cloud Academy's AWS Hands on-labsCloud Academy's AWS Hands on-labs
Cloud Academy's AWS Hands on-labsAlex Casalboni
 
What is AWS lambda?
What is AWS lambda?What is AWS lambda?
What is AWS lambda?Whizlabs
 
Intro to batch processing on AWS
Intro to batch processing on AWSIntro to batch processing on AWS
Intro to batch processing on AWSAmazon Web Services
 
Introduction to Batch Processing on AWS
Introduction to Batch Processing on AWSIntroduction to Batch Processing on AWS
Introduction to Batch Processing on AWSAmazon Web Services
 
Introduction to the Serverless paradigm
Introduction to the Serverless paradigmIntroduction to the Serverless paradigm
Introduction to the Serverless paradigmAlex Casalboni
 
Introduction to aws cloud formation
Introduction to aws cloud formationIntroduction to aws cloud formation
Introduction to aws cloud formationAniruddha jawanjal
 

Tendances (20)

Amazon ECS (March 2016)
Amazon ECS (March 2016)Amazon ECS (March 2016)
Amazon ECS (March 2016)
 
Docker Paris #29
Docker Paris #29Docker Paris #29
Docker Paris #29
 
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
Scaling your web app  horizontally and vertically (ahmedabad amazon aws cloud...Scaling your web app  horizontally and vertically (ahmedabad amazon aws cloud...
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
 
AWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAWS CodeDeploy - basic intro
AWS CodeDeploy - basic intro
 
Meeyup aws-loadbalancing-28032015
Meeyup aws-loadbalancing-28032015Meeyup aws-loadbalancing-28032015
Meeyup aws-loadbalancing-28032015
 
Building serverless apps with Node.js
Building serverless apps with Node.jsBuilding serverless apps with Node.js
Building serverless apps with Node.js
 
Building A Dynamic Website - 31st Jan 2015
Building A Dynamic Website - 31st Jan 2015Building A Dynamic Website - 31st Jan 2015
Building A Dynamic Website - 31st Jan 2015
 
How to copy multiple files from local to aws s3 bucket using aws cli
How to copy multiple files from local to aws s3 bucket using aws cliHow to copy multiple files from local to aws s3 bucket using aws cli
How to copy multiple files from local to aws s3 bucket using aws cli
 
Aws meetup building_lambda
Aws meetup building_lambdaAws meetup building_lambda
Aws meetup building_lambda
 
Deploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkDeploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic Beanstalk
 
Project final pres
Project final presProject final pres
Project final pres
 
20190406 LT(笹亀)
20190406 LT(笹亀)20190406 LT(笹亀)
20190406 LT(笹亀)
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWS
 
Artem Zhurbila 5 aws - cloud formation and beanstalk
Artem Zhurbila 5 aws - cloud formation and beanstalkArtem Zhurbila 5 aws - cloud formation and beanstalk
Artem Zhurbila 5 aws - cloud formation and beanstalk
 
Cloud Academy's AWS Hands on-labs
Cloud Academy's AWS Hands on-labsCloud Academy's AWS Hands on-labs
Cloud Academy's AWS Hands on-labs
 
What is AWS lambda?
What is AWS lambda?What is AWS lambda?
What is AWS lambda?
 
Intro to batch processing on AWS
Intro to batch processing on AWSIntro to batch processing on AWS
Intro to batch processing on AWS
 
Introduction to Batch Processing on AWS
Introduction to Batch Processing on AWSIntroduction to Batch Processing on AWS
Introduction to Batch Processing on AWS
 
Introduction to the Serverless paradigm
Introduction to the Serverless paradigmIntroduction to the Serverless paradigm
Introduction to the Serverless paradigm
 
Introduction to aws cloud formation
Introduction to aws cloud formationIntroduction to aws cloud formation
Introduction to aws cloud formation
 

Similaire à Perl and Amazon Web Services

A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)Julien SIMON
 
Managing AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationManaging AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationAnton Babenko
 
Aws training banglore 13
Aws training banglore 13Aws training banglore 13
Aws training banglore 13AshishApponix
 
Aws training banglore 2
Aws training banglore 2Aws training banglore 2
Aws training banglore 2AshishApponix
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWSJulien SIMON
 
Aws training banglore 8
Aws training banglore 8Aws training banglore 8
Aws training banglore 8AshishApponix
 
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky..."Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...Provectus
 
AWS and Serverless Computing
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless ComputingRoberto Casadei
 
Aws training banglore 1
Aws training banglore 1Aws training banglore 1
Aws training banglore 1AshishApponix
 
Aws training banglore 5
Aws training banglore 5Aws training banglore 5
Aws training banglore 5AshishApponix
 
Aws training banglore 15
Aws training banglore 15Aws training banglore 15
Aws training banglore 15AshishApponix
 
AWS architect certification course
AWS architect certification course AWS architect certification course
AWS architect certification course wiTTyMinds1
 
Aws training banglore 6
Aws training banglore 6Aws training banglore 6
Aws training banglore 6AshishApponix
 
Aws training banglore 11
Aws training banglore 11Aws training banglore 11
Aws training banglore 11AshishApponix
 
Aws training banglore 10
Aws training banglore 10Aws training banglore 10
Aws training banglore 10AshishApponix
 
Architetture Serverless: concentrarsi sull'idea, non sull'infrastruttura
Architetture Serverless: concentrarsi sull'idea, non sull'infrastrutturaArchitetture Serverless: concentrarsi sull'idea, non sull'infrastruttura
Architetture Serverless: concentrarsi sull'idea, non sull'infrastrutturaAmazon Web Services
 
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...Chris Shenton
 
Aws training banglore 12
Aws training banglore 12Aws training banglore 12
Aws training banglore 12AshishApponix
 
Aws training banglore 4
Aws training banglore 4Aws training banglore 4
Aws training banglore 4AshishApponix
 

Similaire à Perl and Amazon Web Services (20)

A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
 
Managing AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormationManaging AWS infrastructure using CloudFormation
Managing AWS infrastructure using CloudFormation
 
Aws training banglore 13
Aws training banglore 13Aws training banglore 13
Aws training banglore 13
 
Aws training banglore 2
Aws training banglore 2Aws training banglore 2
Aws training banglore 2
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWS
 
Aws training banglore 8
Aws training banglore 8Aws training banglore 8
Aws training banglore 8
 
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky..."Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
 
AWS and Serverless Computing
AWS and Serverless ComputingAWS and Serverless Computing
AWS and Serverless Computing
 
Aws training banglore 1
Aws training banglore 1Aws training banglore 1
Aws training banglore 1
 
Aws training banglore 5
Aws training banglore 5Aws training banglore 5
Aws training banglore 5
 
Aws training banglore 15
Aws training banglore 15Aws training banglore 15
Aws training banglore 15
 
AWS architect certification course
AWS architect certification course AWS architect certification course
AWS architect certification course
 
Aws training banglore 6
Aws training banglore 6Aws training banglore 6
Aws training banglore 6
 
Back-end (Flask_AWS)
Back-end (Flask_AWS)Back-end (Flask_AWS)
Back-end (Flask_AWS)
 
Aws training banglore 11
Aws training banglore 11Aws training banglore 11
Aws training banglore 11
 
Aws training banglore 10
Aws training banglore 10Aws training banglore 10
Aws training banglore 10
 
Architetture Serverless: concentrarsi sull'idea, non sull'infrastruttura
Architetture Serverless: concentrarsi sull'idea, non sull'infrastrutturaArchitetture Serverless: concentrarsi sull'idea, non sull'infrastruttura
Architetture Serverless: concentrarsi sull'idea, non sull'infrastruttura
 
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
 
Aws training banglore 12
Aws training banglore 12Aws training banglore 12
Aws training banglore 12
 
Aws training banglore 4
Aws training banglore 4Aws training banglore 4
Aws training banglore 4
 

Plus de Søren Lund

Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016Søren Lund
 
Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Søren Lund
 
Beyond Unit Testing
Beyond Unit TestingBeyond Unit Testing
Beyond Unit TestingSøren Lund
 
Playing with Hadoop (NPW2013)
Playing with Hadoop (NPW2013)Playing with Hadoop (NPW2013)
Playing with Hadoop (NPW2013)Søren Lund
 
Playing with Hadoop 2013-10-31
Playing with Hadoop 2013-10-31Playing with Hadoop 2013-10-31
Playing with Hadoop 2013-10-31Søren Lund
 
Apache JMeter Introduction
Apache JMeter IntroductionApache JMeter Introduction
Apache JMeter IntroductionSøren Lund
 
Basic testing with selenium
Basic testing with seleniumBasic testing with selenium
Basic testing with seleniumSøren Lund
 
E-books and App::Pod2Epub
E-books and App::Pod2EpubE-books and App::Pod2Epub
E-books and App::Pod2EpubSøren Lund
 

Plus de Søren Lund (8)

Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016
 
Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016Documenting Code - Patterns and Anti-patterns - NLPW 2016
Documenting Code - Patterns and Anti-patterns - NLPW 2016
 
Beyond Unit Testing
Beyond Unit TestingBeyond Unit Testing
Beyond Unit Testing
 
Playing with Hadoop (NPW2013)
Playing with Hadoop (NPW2013)Playing with Hadoop (NPW2013)
Playing with Hadoop (NPW2013)
 
Playing with Hadoop 2013-10-31
Playing with Hadoop 2013-10-31Playing with Hadoop 2013-10-31
Playing with Hadoop 2013-10-31
 
Apache JMeter Introduction
Apache JMeter IntroductionApache JMeter Introduction
Apache JMeter Introduction
 
Basic testing with selenium
Basic testing with seleniumBasic testing with selenium
Basic testing with selenium
 
E-books and App::Pod2Epub
E-books and App::Pod2EpubE-books and App::Pod2Epub
E-books and App::Pod2Epub
 

Dernier

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 

Dernier (20)

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 

Perl and Amazon Web Services

  • 1. Perl and Amazon Web Services London Perl Workshop 2019 1
  • 2. Introduction In this talk I will ● give a very short introduction to cloud computing in general ● introduce a few AWS resources (CloudFormation, EC2, S3, Lambda) ● demonstrate running Perl on an EC2 instance ● demonstrate using AWS::Lambda to create a Perl runtime for AWS Lambda 2
  • 3. But, first About me: ● My name is Søren Lund and I’m from Denmark ● I’ve been a SW developer for more than twenty years ● I’ve used many programming languages (C/C++, Perl, Java, JavaScript, …) ● I’ve also worked a lot with build automation, CI/CD and automated tests ● I’ve worked as a AWS consultant for the last couple of years 3
  • 4. Disclaimer ● I’ve no experience running Perl on AWS! However, ● I know Perl ● I know AWS Or, as the meme goes ● “Trust Me, I’m an Engineer” 4
  • 6. Cloud Computing “Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user.” “Cloud computing was popularized with Amazon.com releasing its Elastic Compute Cloud product in 2006.” From https://en.wikipedia.org/wiki/Cloud_computing 6
  • 7. Service Models ● Infrastructure as a service (IaaS) ● Platform as a service (PaaS) ● Software as a service (SaaS) ● Serverless computing ● Function as a service (FaaS) 7
  • 8. Infrastructure as a service (IaaS) “...online services that provide high-level APIs used to dereference various low- level details of underlying network infrastructure like physical computing resources, location, data partitioning, scaling, security, backup etc.” From https://en.wikipedia.org/wiki/Infrastructure_as_a_service 8
  • 9. Function as a service (FaaS) “...category of cloud computing services that provides a platform allowing customers to develop, run, and manage application functionalities without the complexity of building and maintaining the infrastructure typically associated with developing and launching an app.” From https://en.wikipedia.org/wiki/Function_as_a_service 9
  • 11. Amazon Web Service (AWS) ● From 2000 to 2005 Amazon.com works on infrastructure ● AWS is launched on March 19 2006, first service is Amazon S3 (Simple Storage Service) ● Amazon SQS (Simple Queue Service) follows on July 13 ● And on August 25 Amazon EC2 (Elastic Compute Cloud) is launched From https://en.wikipedia.org/wiki/Timeline_of_Amazon_Web_Services 11
  • 12. AWS now has many more services “...137 top level services spread across 23 categories… many of these top level services further expand into multiple sub services” (January 2019) From https://www.quora.com/How-many-AWS-services-are-there See https://aws.amazon.com/products/ 12
  • 13. Getting started with AWS Sign up at https://aws.amazon.com/ Free tier: https://aws.amazon.com/free/ ● Always free - e.g. 1 million free requests on AWS Lambda every month ● 12 month free - e.g. 750 hours EC2 t2.micro instance usage every month ● Trials - e.g. 250 device minutes on AWS Device Farm 13
  • 14. AWS Management Console From the “Console” you can create/modify/maintain/destroy resources. See https://console.aws.amazon.com/console/home 14
  • 15. Launching an EC2 instance from the Console 15
  • 16. AWS CLI The AWS CLI is a uber command “aws”, that can be used to manage your AWS resources and services. ● Written in Python (pip install awscli) ● Enables you to write scripts that creates/modifies/maintains/destroys resources ● You need to create credentials (tokens) in the Console to use the CLI See https://aws.amazon.com/cli/ 16
  • 17. AWS SDKs Official SDKs providing APIs for AWS services are available in ● JavaScript ● Python ● PHP ● .NET ● Ruby ● Java ● Go ● Node.js ● C++ See https://aws.amazon.com/tools/ Image by Jonny Lindner from Pixabay ? 17
  • 18. Paws ● Perl SDK for AWS ● Built by automatically converting Python code into Perl code ● Also includes CLI (paws) ● https://metacpan.org/pod/Paws 18 Image by Jonny Lindner from Pixabay ❤
  • 19. AWS CloudFormation ● Infrastructure as code ● Define resources in templates (JSON or YAML) or visual designer ● Deploy template using CloudFormation using the Consol, CLI or API ● A deployed template is called a Stack 19
  • 20. Basic Anatomy of a CloudFormation Template { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "", "Parameters" : { }, "Resources" : { }, "Outputs" : { } } See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html 20
  • 21. Running Perl on an EC2 instance 21
  • 22. Creating a CloudFormation Templates AWS has lots of examples and snippets. ● Examples: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-sample-templates.html ● Snippets: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/CHAP_TemplateQuickRef.html There’s also a linter for CloudFormation Templates: ● See https://github.com/aws-cloudformation/cfn-python-lint 22
  • 23. Amazon EC2 ● EC2 provides generic computer virtualization ● When using EC2 you will boot an Amazon Machine Image (AMI) to create a running machine, called an instance ● Amazon maintains an AMI called Amazon Linux based on CentOS ○ version 1 has Perl 5.16.3 ○ version 2 has no Perl ● Run it locally: docker run -it amazonlinux bash 23
  • 24. User Data in EC2 CloudFormation templates "UserData": { "Fn::Base64": { "Fn::Join": [ "", [ "#!/bin/bashn", "curl -L http://cpanmin.us | perl - --self-upgraden", "cpanm Acme::Be::Modernn" ]] } } 24
  • 25. Demo time Code is available on GitHub. See https://github.com/soren/perl-and-aws 25
  • 27. AWS Lambda “...an event-driven, serverless computing platform provided by Amazon as a part of the Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code. It was introduced in November 2014.” From https://en.wikipedia.org/wiki/AWS_Lambda 27
  • 28. Console demo 28 Using the AWS Lambda runtime provided by ● https://metacpan.org/pod/AWS::Lambda To execute the following: sub handle { my ($payload, $context) = @_; my $result = encode_json("Hello from Perl!"); return +{ statusCode => 200, body => $result }; }