SlideShare ist ein Scribd-Unternehmen logo
1 von 61
Paws – A Perl AWS SDK
@pplu_io
06/11/2015 - Barcelona
Barcelona Perl Workshop 2015
Jose Luis Martinez
AWS is…
• Cloud Computing
• Consume computing/database/queuing/etc services via an API
• The biggest datacenter you can think of
• With global reach
• Everything is an API 
AWS is…
Programmers wet dream
AWS is…
Programmers wet dream
AWS is…
Builders wet dream
Why?
Isn’t there support for AWS on CPAN?
AWS Services on CPAN
• There are a LOT
• EC2, SQS, S3, RDS, DynamoDB, etc
• But lots are were missing
• AWS::CLIWrapper is a generic solution too
• Shells off to the oficial AWS CLI (python)
I want Perl support for ALL of them
Different authors, different opinions
• Default region (eu-west-1 for some, us-east-1 for others)
• Different HTTP clients
• LWP, HTTP::Tiny, Furl, etc
I want explicit, required, region. Croak if not specified
Pluggable HTTP client?
Different authors, different photo
• Some regions not supported due to bugs
• Subtle name changes in region endpoints
• Credential handling
• Module just covers their needs
I want as broad support as we can get
Credential handling
• Roles in AWS help you not have to distribute credentials (AccessKey
and SecretKey)
• Support depends on author of module knowing of them / needing them
I want support for Instance Roles, STS AssumeRole, Federation for all
services
UpToDate-ness
• Being up to date depends on authors needs, time, etc
• AWS APIs are updated a lot
I want up to date APIs
Lets write an SDK!
Some numbers
52 services
Some numbers
52 services That was in 2015-09
Some numbers
60 services Today (2015-11)
Some numbers
60 services
~1600 actions
Some numbers
60 services
~1600 actions
~3700 distinct input/output objects
Some numbers
60 services
~1600 actions
~3700 distinct input/output objects
~12000 attributes
Write by hand?
Write by hand?
Paws is autogenerated
Using Paws
Authentication
• Don’t burn credentials in your code (or even your apps config)
Use ENV variables AWS_ACCESS_KEY_ID and
AWS_SECRET_ACCESS_KEY
In file ~/.aws/credentials
[default]
aws_access_key_id=AKIXKDSJFDSFSJD
aws_secret_access_key=Gdksjfkso+erkkdjreiw-t
Each AWS API is a “Service Class”
• Each Action in the API is a method on the Service Class
• EC2 API -> Paws::EC2 service class
• Paws::EC2 objects have methods like
• RunInstances
• TerminateInstances
• DescribeInstances
How do I get an instance of a service
class?
use Paws;
my $ec2 = Paws->service(‘EC2’, region => ‘eu-west-1’);
my $iam = Paws->service(‘IAM’);
# $ec2 and $iam are instances of Paws::EC2 and
Paws::IAM
# they use Paws default config (they just work )
How do I get an instance of a service
class? (II)
my $paws = Paws->new(config => {
region => ‘eu-west-1’,
caller => ‘Paws::Net::LWPCaller’,
credentials => ‘My::Custom::Credential::Provider’
});
my $ec2 = $paws->service(‘EC2’);
# ec2 is bound to region ‘eu-west-1’
# and called with LWP
# and gets it’s credentials from some custom source
Calling a method
$ec2->Method1(
Param1 => ‘Something’,
Param2 => 42,
Complex1 => {
x => 1,
y => 2,
z => 3
},
Complex2 => [
{ x => 1, y => 2 },
{ x => 2, y => 3 }
])
Calling a method
$ec2->Method1(
Param1 => ‘Something’,
Param2 => 42,
Complex1 => {
x => 1,
y => 2,
z => 3
},
Complex2 => [
{ x => 1, y => 2 },
{ x => 2, y => 3 }
])
Docs tell you that this is a Paws::Service::XXX object, but you don’t have
to instance it !!!
Just pass the attributes and the values as a hashref 
Calling a method: maps
• Arbitrary key/value pairs
• Don’t build an object either. Paws will handle it for you
• $ec2->Method1(
Map1 => {
x => 1,
y => 2,
z => 3
});
Methods return objects
my $object = $x->Method1(…)
Method1 returns Paws::Service::Method1Result
has ‘X’, has ‘Y’, has ‘Complex’ => (isa => ‘Paws::Service::Complex1’)
$object->X
$object->Complex->Complex1Attribute
Tricks
Tricks: Preloading classes
If you fork, and you do this in every child:
my $ec2 = Paws->service(‘EC2’)
$ec2->RunInstances(…)
Memory for classes gets consumed in each child process
Paws->preload(‘EC2’)
loads ALL EC2 classes.
Paws->preload(‘EC2’, ‘RunInstances’)
loads classes only for $ec2->RunInstances(…)
https://github.com/pplu/aws-sdk-perl/blob/master/examples/preload.pl
Tricks: Immutabilizing classes
• Paws has lots of classes for representing lots of things
• They are not (Moose) immutable (thinking that in short lived scripts
immutability makes them slower)
Paws->default_config->immutable(1);
Just after use Paws;
https://github.com/pplu/aws-sdk-perl/blob/master/examples/mutability.pl
Tricks: CLI
• Paws ships with a CLI
paws SERVICE --region xx-east-1 DescribeFoo Arg1 Val1
Uses ARGV::Struct to convey nested datastructures via command line
Tricks: ARGV::Struct
paws SVC HashProperty { K1 V1 K2 V2 } …
paws SVC ArrayProperty [ 1 2 3 4 ] …
Tricks: open_aws_console
• Opens a browser with the AWS console (using the SignIn service)
• Uses your current credentials (extends a temporary token)
Tricks: Changing endpoints
my $predictor = $paws->service('ML', region_rules =>
[ { uri => $endpoint_url } ]);
• Works for any service: SQS, EC2…
Tricks: Credential providers
• Default one tries to behave like AWS SDKs
• Environment (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY)
• File (~/.aws/credentials, an ini file)
• From the metadata service (Instance Roles)
• Your own
• Just attach Role “Paws::Credential” to a class, and get the credentials from
wherever 
Tricks: Using Roles
If you’re running on an instance in AWS*:
use Paws;
my $ec2 = Paws->service(‘EC2’, region => ‘eu-west-1’);
$ec2->DescribeInstances;
Just works! Look ma! No credentials!
* With an Instance Role (or Instance Profile)
Hot news
New License: Apache 2.0
Future
Future (hint: help needed and accepted)
• Testing Async stuff
• Retrying
• Some APIs return temporary failures
• Want automatic exponential backoff with jitter -> This is in the works on retry branch
• Paging
• Some APIs return paged results
• Want a “give me all of them”  This is in the works on a fix-iterators branch
• Waiters
• Wait until some condition is met
• Want a call to wait until Instance is in running state
• A lot more: take a look at GitHub issues
Future: Waiters
• Wait until some condition is met
• Wait until a DynamoDB table is ready
Wait until an instance is running
• Waiters are specified in jmespath format in metadata
• I want jmespath implemented in Perl. See jmespath.org
• Lets implement jmespath in Perl!
Future: DynamoDB as a Document store
A Put Requires this
{ ‘A key’ => { ‘S’ => ‘A string’ },
‘Another Key’ => { ‘N’ => 123 },
‘A String array’ => { ‘SS’ => [ ‘String1’, ‘String2’ ] }
}
A document is more like this
{ ‘A key’ => ‘A string’,
‘Another Key’ => 123,
‘A String array’ => [ ‘String1’, ‘String2’ ]
}
So lets convert them for the user: Issue #41 is for the taking 
Future (hint: help needed and accepted)
• Object Oriented results
• $ec2->TerminateInstances(InstanceIds => [ ‘i-12345678’ ])
• $instance->Terminate
• Special properties
• En/Decode base64, URIescape, etc
• Better access to ArrayRef and HashRef like properties
• Use Array and Hash Moose trait for
• Number of elements
• Get element i
• Get list of elements, get list of keys
Future (hint: help needed and accepted)
• Refactoring generator clases
• MooseX::DataModel
• Template::Toolkit
• Split Paws into separately instalable modules
• Rinse and Repeat
• For other APIs
• AWS API as a Service
Support for APIs
0
5
10
15
20
25
30
35
40
45
50
REST Plain
Types of APIs
Query+XML JSON EC2
Support for APIs
0
5
10
15
20
25
30
35
40
45
50
REST Plain
Types of APIs
Query+XML JSON EC2
Implemented
Support for APIs
0
5
10
15
20
25
30
35
40
45
50
REST Plain
Types of APIs
Query+XML JSON EC2
Implemented
Need love and testing
S3 not working
Route53?
Lambda?
…
If you want to contribute
Paws is autogenerated
• AWS has some JSON definition files in their SDKs (data-driven)
• Pick them up to generate classes for:
• Actions
• Inputs to actions (parameters)
• Outputs from actions (outputs)
• HTML documentation -> POD
make gen-classes
Code generators
• In builder-lib (not distributed on CPAN)
• Paws::API::Builder
• Paws::API::Builder::EC2
• Paws::API::Builder::query
• Paws::API::Builder::json
• Paws::API::Builder::restjson
• Paws::API::Builder::restxml
• Leaves all auto-generated code in auto-lib (distributed on CPAN)
• Hand-written code is in lib
Go build!
Fork your heart out
https://github.com/pplu/aws-sdk-perl/
Contact me:
Twitter: @pplu_io
Mail: joseluis.martinez@capside.com
CPAN: JLMARTIN
CAPSiDE
Twitter: @capside
Mail: hello@capside.com

Weitere ähnliche Inhalte

Was ist angesagt?

Nodeless scaling with Karpenter
Nodeless scaling with KarpenterNodeless scaling with Karpenter
Nodeless scaling with KarpenterMarko Bevc
 
ELB & CloudWatch & AutoScaling - AWSマイスターシリーズ
ELB & CloudWatch & AutoScaling - AWSマイスターシリーズELB & CloudWatch & AutoScaling - AWSマイスターシリーズ
ELB & CloudWatch & AutoScaling - AWSマイスターシリーズAmazon Web Services Japan
 
Elastic Load Balancing 심층 분석 - AWS Summit Seoul 2017
Elastic Load Balancing 심층 분석 - AWS Summit Seoul 2017Elastic Load Balancing 심층 분석 - AWS Summit Seoul 2017
Elastic Load Balancing 심층 분석 - AWS Summit Seoul 2017Amazon Web Services Korea
 
20210126 AWS Black Belt Online Seminar AWS CodeDeploy
20210126 AWS Black Belt Online Seminar AWS CodeDeploy20210126 AWS Black Belt Online Seminar AWS CodeDeploy
20210126 AWS Black Belt Online Seminar AWS CodeDeployAmazon Web Services Japan
 
20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation 20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation Amazon Web Services Japan
 
AWS Step Functionsを使ったバックアップシステム
AWS Step Functionsを使ったバックアップシステムAWS Step Functionsを使ったバックアップシステム
AWS Step Functionsを使ったバックアップシステムAkihiro Kamiyama
 
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)Amazon Web Services Korea
 
AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)
AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)
AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)Amazon Web Services Japan
 
AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례
AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례
AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례Amazon Web Services Korea
 
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 네트워크 - 권신중 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 네트워크 - 권신중 AWS 솔루션...[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 네트워크 - 권신중 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 네트워크 - 권신중 AWS 솔루션...Amazon Web Services Korea
 
AWS上でのWebアプリケーションデプロイ
AWS上でのWebアプリケーションデプロイAWS上でのWebアプリケーションデプロイ
AWS上でのWebアプリケーションデプロイAmazon Web Services Japan
 
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitInfrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitAmazon Web Services
 
AWS Cloud Formation
AWS Cloud Formation AWS Cloud Formation
AWS Cloud Formation Adam Book
 
AWS Black Belt Online Seminar Amazon Elastic Block Store (EBS)
AWS Black Belt Online Seminar Amazon Elastic Block Store (EBS) AWS Black Belt Online Seminar Amazon Elastic Block Store (EBS)
AWS Black Belt Online Seminar Amazon Elastic Block Store (EBS) Amazon Web Services Japan
 
AWS Power Tools: Advanced AWS CloudFormation and CLI
AWS Power Tools: Advanced AWS CloudFormation and CLIAWS Power Tools: Advanced AWS CloudFormation and CLI
AWS Power Tools: Advanced AWS CloudFormation and CLIAmazon Web Services
 
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
AWS Black Belt Online Seminar 2017 Amazon DynamoDB AWS Black Belt Online Seminar 2017 Amazon DynamoDB
AWS Black Belt Online Seminar 2017 Amazon DynamoDB Amazon Web Services Japan
 
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介Amazon Web Services Japan
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with ContainersAmazon Web Services
 

Was ist angesagt? (20)

Nodeless scaling with Karpenter
Nodeless scaling with KarpenterNodeless scaling with Karpenter
Nodeless scaling with Karpenter
 
ELB & CloudWatch & AutoScaling - AWSマイスターシリーズ
ELB & CloudWatch & AutoScaling - AWSマイスターシリーズELB & CloudWatch & AutoScaling - AWSマイスターシリーズ
ELB & CloudWatch & AutoScaling - AWSマイスターシリーズ
 
Elastic Load Balancing 심층 분석 - AWS Summit Seoul 2017
Elastic Load Balancing 심층 분석 - AWS Summit Seoul 2017Elastic Load Balancing 심층 분석 - AWS Summit Seoul 2017
Elastic Load Balancing 심층 분석 - AWS Summit Seoul 2017
 
20210126 AWS Black Belt Online Seminar AWS CodeDeploy
20210126 AWS Black Belt Online Seminar AWS CodeDeploy20210126 AWS Black Belt Online Seminar AWS CodeDeploy
20210126 AWS Black Belt Online Seminar AWS CodeDeploy
 
Introduction to AWS Batch
Introduction to AWS BatchIntroduction to AWS Batch
Introduction to AWS Batch
 
20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation 20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation
 
AWS Step Functionsを使ったバックアップシステム
AWS Step Functionsを使ったバックアップシステムAWS Step Functionsを使ったバックアップシステム
AWS Step Functionsを使ったバックアップシステム
 
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
 
AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)
AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)
AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)
 
AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례
AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례
AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례
 
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 네트워크 - 권신중 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 네트워크 - 권신중 AWS 솔루션...[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 네트워크 - 권신중 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 네트워크 - 권신중 AWS 솔루션...
 
Aws certified solutions architect
Aws certified solutions architectAws certified solutions architect
Aws certified solutions architect
 
AWS上でのWebアプリケーションデプロイ
AWS上でのWebアプリケーションデプロイAWS上でのWebアプリケーションデプロイ
AWS上でのWebアプリケーションデプロイ
 
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitInfrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
 
AWS Cloud Formation
AWS Cloud Formation AWS Cloud Formation
AWS Cloud Formation
 
AWS Black Belt Online Seminar Amazon Elastic Block Store (EBS)
AWS Black Belt Online Seminar Amazon Elastic Block Store (EBS) AWS Black Belt Online Seminar Amazon Elastic Block Store (EBS)
AWS Black Belt Online Seminar Amazon Elastic Block Store (EBS)
 
AWS Power Tools: Advanced AWS CloudFormation and CLI
AWS Power Tools: Advanced AWS CloudFormation and CLIAWS Power Tools: Advanced AWS CloudFormation and CLI
AWS Power Tools: Advanced AWS CloudFormation and CLI
 
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
AWS Black Belt Online Seminar 2017 Amazon DynamoDB AWS Black Belt Online Seminar 2017 Amazon DynamoDB
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
 
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
 

Andere mochten auch

MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
MooseX::Datamodel - Barcelona Perl Workshop Lightning talkMooseX::Datamodel - Barcelona Perl Workshop Lightning talk
MooseX::Datamodel - Barcelona Perl Workshop Lightning talkJose Luis Martínez
 
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
Writing plugins for Nagios and Opsview - CAPSiDE Tech TalksWriting plugins for Nagios and Opsview - CAPSiDE Tech Talks
Writing plugins for Nagios and Opsview - CAPSiDE Tech TalksJose Luis Martínez
 
Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Jose Luis Martínez
 
How To Use Blogger
How To Use BloggerHow To Use Blogger
How To Use BloggerMarcus9000
 
Pictures i have used in my magazine 2
Pictures i have used in my magazine 2Pictures i have used in my magazine 2
Pictures i have used in my magazine 2kamar95
 
Kutner and olsen
Kutner and olsenKutner and olsen
Kutner and olsenkamar95
 
Алексей Левинсон Пространства протеста. Московские митинги и сообщество горожан
Алексей Левинсон Пространства протеста. Московские митинги и сообщество горожанАлексей Левинсон Пространства протеста. Московские митинги и сообщество горожан
Алексей Левинсон Пространства протеста. Московские митинги и сообщество горожанMélusine Enfaillite
 
Daniel & Ernesto's presentation
Daniel & Ernesto's presentationDaniel & Ernesto's presentation
Daniel & Ernesto's presentationErnesto Sepulveda
 
Работа в компании "АйТи Капитал"
Работа в компании "АйТи Капитал"Работа в компании "АйТи Капитал"
Работа в компании "АйТи Капитал"itcapital
 
Proposal
ProposalProposal
Proposalramcoza
 
Questionnaire results
Questionnaire resultsQuestionnaire results
Questionnaire resultskamar95
 

Andere mochten auch (20)

Paws - A Perl AWS SDK
Paws - A Perl AWS SDKPaws - A Perl AWS SDK
Paws - A Perl AWS SDK
 
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
MooseX::Datamodel - Barcelona Perl Workshop Lightning talkMooseX::Datamodel - Barcelona Perl Workshop Lightning talk
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
 
Perl and AWS
Perl and AWSPerl and AWS
Perl and AWS
 
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
Writing plugins for Nagios and Opsview - CAPSiDE Tech TalksWriting plugins for Nagios and Opsview - CAPSiDE Tech Talks
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
 
Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014
 
Boosting MySQL (for starters)
Boosting MySQL (for starters)Boosting MySQL (for starters)
Boosting MySQL (for starters)
 
Plenv and carton
Plenv and cartonPlenv and carton
Plenv and carton
 
How To Use Blogger
How To Use BloggerHow To Use Blogger
How To Use Blogger
 
Pptplan morgenjuli2011 pptbehandelcoordinatoren
Pptplan morgenjuli2011 pptbehandelcoordinatorenPptplan morgenjuli2011 pptbehandelcoordinatoren
Pptplan morgenjuli2011 pptbehandelcoordinatoren
 
Pictures i have used in my magazine 2
Pictures i have used in my magazine 2Pictures i have used in my magazine 2
Pictures i have used in my magazine 2
 
Huidobro&Sepulveda_2010
Huidobro&Sepulveda_2010Huidobro&Sepulveda_2010
Huidobro&Sepulveda_2010
 
Bloedsomloop versie 1.0
Bloedsomloop versie 1.0Bloedsomloop versie 1.0
Bloedsomloop versie 1.0
 
Kutner and olsen
Kutner and olsenKutner and olsen
Kutner and olsen
 
Polifonia.4.12
Polifonia.4.12Polifonia.4.12
Polifonia.4.12
 
NRD: Nagios Result Distributor
NRD: Nagios Result DistributorNRD: Nagios Result Distributor
NRD: Nagios Result Distributor
 
Алексей Левинсон Пространства протеста. Московские митинги и сообщество горожан
Алексей Левинсон Пространства протеста. Московские митинги и сообщество горожанАлексей Левинсон Пространства протеста. Московские митинги и сообщество горожан
Алексей Левинсон Пространства протеста. Московские митинги и сообщество горожан
 
Daniel & Ernesto's presentation
Daniel & Ernesto's presentationDaniel & Ernesto's presentation
Daniel & Ernesto's presentation
 
Работа в компании "АйТи Капитал"
Работа в компании "АйТи Капитал"Работа в компании "АйТи Капитал"
Работа в компании "АйТи Капитал"
 
Proposal
ProposalProposal
Proposal
 
Questionnaire results
Questionnaire resultsQuestionnaire results
Questionnaire results
 

Ähnlich wie Paws - Perl AWS SDK Update - November 2015

Paws: A Perl AWS SDK - YAPC Europe 2015
Paws: A Perl AWS SDK - YAPC Europe 2015Paws: A Perl AWS SDK - YAPC Europe 2015
Paws: A Perl AWS SDK - YAPC Europe 2015CAPSiDE
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersJeremy Lindblom
 
Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)Enrico Zimuel
 
(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the Hood(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the HoodAmazon Web Services
 
Ice mini guide
Ice mini guideIce mini guide
Ice mini guideAdy Liu
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disquszeeg
 
Cloud Computing in PHP With the Amazon Web Services
Cloud Computing in PHP With the Amazon Web ServicesCloud Computing in PHP With the Amazon Web Services
Cloud Computing in PHP With the Amazon Web ServicesAmazon Web Services
 
Intro to fog and openstack jp
Intro to fog and openstack jpIntro to fog and openstack jp
Intro to fog and openstack jpSatoshi Konno
 
(DEV301) Automating AWS with the AWS CLI
(DEV301) Automating AWS with the AWS CLI(DEV301) Automating AWS with the AWS CLI
(DEV301) Automating AWS with the AWS CLIAmazon 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
 
AWS Lambda at JUST EAT
AWS Lambda at JUST EATAWS Lambda at JUST EAT
AWS Lambda at JUST EATAndrew Brown
 
Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Simon McCartney
 
Managing Infrastructure as Code
Managing Infrastructure as CodeManaging Infrastructure as Code
Managing Infrastructure as CodeAllan Shone
 
Building and scaling your containerized microservices on Amazon ECS
Building and scaling your containerized microservices on Amazon ECSBuilding and scaling your containerized microservices on Amazon ECS
Building and scaling your containerized microservices on Amazon ECSAmazon Web Services
 
Nyc big datagenomics-pizarroa-sept2017
Nyc big datagenomics-pizarroa-sept2017Nyc big datagenomics-pizarroa-sept2017
Nyc big datagenomics-pizarroa-sept2017delagoya
 
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesWKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesAmazon Web Services
 
Кирилл Безпалый, .NET Developer, Ciklum
Кирилл Безпалый, .NET Developer, CiklumКирилл Безпалый, .NET Developer, Ciklum
Кирилл Безпалый, .NET Developer, CiklumAlina Vilk
 
Serverless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBServerless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBAmazon Web Services
 

Ähnlich wie Paws - Perl AWS SDK Update - November 2015 (20)

Paws: A Perl AWS SDK - YAPC Europe 2015
Paws: A Perl AWS SDK - YAPC Europe 2015Paws: A Perl AWS SDK - YAPC Europe 2015
Paws: A Perl AWS SDK - YAPC Europe 2015
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
 
Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)
 
(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the Hood(DVO301) AWS OpsWorks Under the Hood
(DVO301) AWS OpsWorks Under the Hood
 
Ice mini guide
Ice mini guideIce mini guide
Ice mini guide
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disqus
 
Cloud Computing in PHP With the Amazon Web Services
Cloud Computing in PHP With the Amazon Web ServicesCloud Computing in PHP With the Amazon Web Services
Cloud Computing in PHP With the Amazon Web Services
 
Intro to fog and openstack jp
Intro to fog and openstack jpIntro to fog and openstack jp
Intro to fog and openstack jp
 
(DEV301) Automating AWS with the AWS CLI
(DEV301) Automating AWS with the AWS CLI(DEV301) Automating AWS with the AWS CLI
(DEV301) Automating AWS with the AWS CLI
 
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)
 
AWS Lambda at JUST EAT
AWS Lambda at JUST EATAWS Lambda at JUST EAT
AWS Lambda at JUST EAT
 
Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013Stack kicker devopsdays-london-2013
Stack kicker devopsdays-london-2013
 
AWS glue technical enablement training
AWS glue technical enablement trainingAWS glue technical enablement training
AWS glue technical enablement training
 
Managing Infrastructure as Code
Managing Infrastructure as CodeManaging Infrastructure as Code
Managing Infrastructure as Code
 
Building and scaling your containerized microservices on Amazon ECS
Building and scaling your containerized microservices on Amazon ECSBuilding and scaling your containerized microservices on Amazon ECS
Building and scaling your containerized microservices on Amazon ECS
 
Nyc big datagenomics-pizarroa-sept2017
Nyc big datagenomics-pizarroa-sept2017Nyc big datagenomics-pizarroa-sept2017
Nyc big datagenomics-pizarroa-sept2017
 
Real World MVC
Real World MVCReal World MVC
Real World MVC
 
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesWKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
 
Кирилл Безпалый, .NET Developer, Ciklum
Кирилл Безпалый, .NET Developer, CiklumКирилл Безпалый, .NET Developer, Ciklum
Кирилл Безпалый, .NET Developer, Ciklum
 
Serverless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBServerless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDB
 

Mehr von Jose Luis Martínez

Mehr von Jose Luis Martínez (9)

Being cloudy with perl
Being cloudy with perlBeing cloudy with perl
Being cloudy with perl
 
Modern Perl toolchain (help building microservices)
Modern Perl toolchain (help building microservices)Modern Perl toolchain (help building microservices)
Modern Perl toolchain (help building microservices)
 
Escribir plugins para Nagios en Perl
Escribir plugins para Nagios en PerlEscribir plugins para Nagios en Perl
Escribir plugins para Nagios en Perl
 
Writing nagios plugins in perl
Writing nagios plugins in perlWriting nagios plugins in perl
Writing nagios plugins in perl
 
Ficheros y directorios
Ficheros y directoriosFicheros y directorios
Ficheros y directorios
 
DBIx::Class
DBIx::ClassDBIx::Class
DBIx::Class
 
DBI
DBIDBI
DBI
 
The modern perl toolchain
The modern perl toolchainThe modern perl toolchain
The modern perl toolchain
 
Introducción a las Expresiones Regulares
Introducción a las Expresiones RegularesIntroducción a las Expresiones Regulares
Introducción a las Expresiones Regulares
 

Kürzlich hochgeladen

How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?Linksys Velop Login
 
Development Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appsDevelopment Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appscristianmanaila2
 
Bug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideBug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideVarun Mithran
 
Thank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsThank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsrahman018755
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan
 
Reggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsrahman018755
 
Statistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfStatistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfOndejSur
 
Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxChloeMeadows1
 
I’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 ShirtI’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 Shirtrahman018755
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkklolsDocherty
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyDamar Juniarto
 
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.Tortogel
 
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresenceCyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresencePC Doctors NET
 
Premier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfPremier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfappinfoedgeca
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebJie Liau
 

Kürzlich hochgeladen (16)

How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
Development Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appsDevelopment Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of apps
 
GOOGLE Io 2024 At takes center stage.pdf
GOOGLE Io 2024 At takes center stage.pdfGOOGLE Io 2024 At takes center stage.pdf
GOOGLE Io 2024 At takes center stage.pdf
 
Bug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideBug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's Guide
 
Thank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsThank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirts
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 
Reggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirts
 
Statistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfStatistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdf
 
Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptx
 
I’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 ShirtI’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 Shirt
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
 
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresenceCyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
 
Premier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfPremier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdf
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
 

Paws - Perl AWS SDK Update - November 2015

  • 1. Paws – A Perl AWS SDK @pplu_io 06/11/2015 - Barcelona Barcelona Perl Workshop 2015 Jose Luis Martinez
  • 2. AWS is… • Cloud Computing • Consume computing/database/queuing/etc services via an API • The biggest datacenter you can think of • With global reach • Everything is an API 
  • 6. Why? Isn’t there support for AWS on CPAN?
  • 7. AWS Services on CPAN • There are a LOT • EC2, SQS, S3, RDS, DynamoDB, etc • But lots are were missing • AWS::CLIWrapper is a generic solution too • Shells off to the oficial AWS CLI (python) I want Perl support for ALL of them
  • 8. Different authors, different opinions • Default region (eu-west-1 for some, us-east-1 for others) • Different HTTP clients • LWP, HTTP::Tiny, Furl, etc I want explicit, required, region. Croak if not specified Pluggable HTTP client?
  • 9.
  • 10.
  • 11. Different authors, different photo • Some regions not supported due to bugs • Subtle name changes in region endpoints • Credential handling • Module just covers their needs I want as broad support as we can get
  • 12. Credential handling • Roles in AWS help you not have to distribute credentials (AccessKey and SecretKey) • Support depends on author of module knowing of them / needing them I want support for Instance Roles, STS AssumeRole, Federation for all services
  • 13. UpToDate-ness • Being up to date depends on authors needs, time, etc • AWS APIs are updated a lot I want up to date APIs
  • 15.
  • 17. Some numbers 52 services That was in 2015-09
  • 18. Some numbers 60 services Today (2015-11)
  • 20. Some numbers 60 services ~1600 actions ~3700 distinct input/output objects
  • 21. Some numbers 60 services ~1600 actions ~3700 distinct input/output objects ~12000 attributes
  • 22.
  • 26.
  • 28. Authentication • Don’t burn credentials in your code (or even your apps config) Use ENV variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY In file ~/.aws/credentials [default] aws_access_key_id=AKIXKDSJFDSFSJD aws_secret_access_key=Gdksjfkso+erkkdjreiw-t
  • 29. Each AWS API is a “Service Class” • Each Action in the API is a method on the Service Class • EC2 API -> Paws::EC2 service class • Paws::EC2 objects have methods like • RunInstances • TerminateInstances • DescribeInstances
  • 30. How do I get an instance of a service class? use Paws; my $ec2 = Paws->service(‘EC2’, region => ‘eu-west-1’); my $iam = Paws->service(‘IAM’); # $ec2 and $iam are instances of Paws::EC2 and Paws::IAM # they use Paws default config (they just work )
  • 31. How do I get an instance of a service class? (II) my $paws = Paws->new(config => { region => ‘eu-west-1’, caller => ‘Paws::Net::LWPCaller’, credentials => ‘My::Custom::Credential::Provider’ }); my $ec2 = $paws->service(‘EC2’); # ec2 is bound to region ‘eu-west-1’ # and called with LWP # and gets it’s credentials from some custom source
  • 32. Calling a method $ec2->Method1( Param1 => ‘Something’, Param2 => 42, Complex1 => { x => 1, y => 2, z => 3 }, Complex2 => [ { x => 1, y => 2 }, { x => 2, y => 3 } ])
  • 33. Calling a method $ec2->Method1( Param1 => ‘Something’, Param2 => 42, Complex1 => { x => 1, y => 2, z => 3 }, Complex2 => [ { x => 1, y => 2 }, { x => 2, y => 3 } ]) Docs tell you that this is a Paws::Service::XXX object, but you don’t have to instance it !!! Just pass the attributes and the values as a hashref 
  • 34. Calling a method: maps • Arbitrary key/value pairs • Don’t build an object either. Paws will handle it for you • $ec2->Method1( Map1 => { x => 1, y => 2, z => 3 });
  • 35. Methods return objects my $object = $x->Method1(…) Method1 returns Paws::Service::Method1Result has ‘X’, has ‘Y’, has ‘Complex’ => (isa => ‘Paws::Service::Complex1’) $object->X $object->Complex->Complex1Attribute
  • 37. Tricks: Preloading classes If you fork, and you do this in every child: my $ec2 = Paws->service(‘EC2’) $ec2->RunInstances(…) Memory for classes gets consumed in each child process Paws->preload(‘EC2’) loads ALL EC2 classes. Paws->preload(‘EC2’, ‘RunInstances’) loads classes only for $ec2->RunInstances(…) https://github.com/pplu/aws-sdk-perl/blob/master/examples/preload.pl
  • 38. Tricks: Immutabilizing classes • Paws has lots of classes for representing lots of things • They are not (Moose) immutable (thinking that in short lived scripts immutability makes them slower) Paws->default_config->immutable(1); Just after use Paws; https://github.com/pplu/aws-sdk-perl/blob/master/examples/mutability.pl
  • 39. Tricks: CLI • Paws ships with a CLI paws SERVICE --region xx-east-1 DescribeFoo Arg1 Val1 Uses ARGV::Struct to convey nested datastructures via command line
  • 40. Tricks: ARGV::Struct paws SVC HashProperty { K1 V1 K2 V2 } … paws SVC ArrayProperty [ 1 2 3 4 ] …
  • 41. Tricks: open_aws_console • Opens a browser with the AWS console (using the SignIn service) • Uses your current credentials (extends a temporary token)
  • 42. Tricks: Changing endpoints my $predictor = $paws->service('ML', region_rules => [ { uri => $endpoint_url } ]); • Works for any service: SQS, EC2…
  • 43. Tricks: Credential providers • Default one tries to behave like AWS SDKs • Environment (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) • File (~/.aws/credentials, an ini file) • From the metadata service (Instance Roles) • Your own • Just attach Role “Paws::Credential” to a class, and get the credentials from wherever 
  • 44. Tricks: Using Roles If you’re running on an instance in AWS*: use Paws; my $ec2 = Paws->service(‘EC2’, region => ‘eu-west-1’); $ec2->DescribeInstances; Just works! Look ma! No credentials! * With an Instance Role (or Instance Profile)
  • 45. Hot news New License: Apache 2.0
  • 47.
  • 48. Future (hint: help needed and accepted) • Testing Async stuff • Retrying • Some APIs return temporary failures • Want automatic exponential backoff with jitter -> This is in the works on retry branch • Paging • Some APIs return paged results • Want a “give me all of them”  This is in the works on a fix-iterators branch • Waiters • Wait until some condition is met • Want a call to wait until Instance is in running state • A lot more: take a look at GitHub issues
  • 49. Future: Waiters • Wait until some condition is met • Wait until a DynamoDB table is ready Wait until an instance is running • Waiters are specified in jmespath format in metadata • I want jmespath implemented in Perl. See jmespath.org • Lets implement jmespath in Perl!
  • 50. Future: DynamoDB as a Document store A Put Requires this { ‘A key’ => { ‘S’ => ‘A string’ }, ‘Another Key’ => { ‘N’ => 123 }, ‘A String array’ => { ‘SS’ => [ ‘String1’, ‘String2’ ] } } A document is more like this { ‘A key’ => ‘A string’, ‘Another Key’ => 123, ‘A String array’ => [ ‘String1’, ‘String2’ ] } So lets convert them for the user: Issue #41 is for the taking 
  • 51. Future (hint: help needed and accepted) • Object Oriented results • $ec2->TerminateInstances(InstanceIds => [ ‘i-12345678’ ]) • $instance->Terminate • Special properties • En/Decode base64, URIescape, etc • Better access to ArrayRef and HashRef like properties • Use Array and Hash Moose trait for • Number of elements • Get element i • Get list of elements, get list of keys
  • 52. Future (hint: help needed and accepted) • Refactoring generator clases • MooseX::DataModel • Template::Toolkit • Split Paws into separately instalable modules • Rinse and Repeat • For other APIs • AWS API as a Service
  • 53. Support for APIs 0 5 10 15 20 25 30 35 40 45 50 REST Plain Types of APIs Query+XML JSON EC2
  • 54. Support for APIs 0 5 10 15 20 25 30 35 40 45 50 REST Plain Types of APIs Query+XML JSON EC2 Implemented
  • 55. Support for APIs 0 5 10 15 20 25 30 35 40 45 50 REST Plain Types of APIs Query+XML JSON EC2 Implemented Need love and testing S3 not working Route53? Lambda? …
  • 56. If you want to contribute
  • 57. Paws is autogenerated • AWS has some JSON definition files in their SDKs (data-driven) • Pick them up to generate classes for: • Actions • Inputs to actions (parameters) • Outputs from actions (outputs) • HTML documentation -> POD make gen-classes
  • 58.
  • 59. Code generators • In builder-lib (not distributed on CPAN) • Paws::API::Builder • Paws::API::Builder::EC2 • Paws::API::Builder::query • Paws::API::Builder::json • Paws::API::Builder::restjson • Paws::API::Builder::restxml • Leaves all auto-generated code in auto-lib (distributed on CPAN) • Hand-written code is in lib
  • 61. Fork your heart out https://github.com/pplu/aws-sdk-perl/ Contact me: Twitter: @pplu_io Mail: joseluis.martinez@capside.com CPAN: JLMARTIN CAPSiDE Twitter: @capside Mail: hello@capside.com