SlideShare a Scribd company logo
Building an AWS
SDK
Granada Perl Workshop 2014
Jose Luis Martinez
JLMARTIN on CPAN
Twitter: @pplu_io
joseluis.martinez@capside.com
About me
 CTO @CAPSiDE
 Training Partner for AWS
 Delivering AWS official training
 All four AWS certifications
 Real experience with real platforms
 Deliver consulting and continuous operation
 Writing Perl for +10 years
 And still having fun with it!
About AWS
 Mostly known for EC2 and S3
 But lot's more services! (+30)
 Everything is an API
 “Programmable datacenter”
 Software Defined Everything
About AWS
 Mostly known for EC2 and S3
 But lot's more services! (+30)
 Everything is an API
 “Programmable datacenter”
 Software Defined Everything
It’s the your wet dream
Perl & AWS
Bad news

 No official SDK
 Official ones: Ruby, PHP,
Python, JS, .Net, Java
 Note: python wasn't
official initially!
Perl & AWS
Good news

 CPAN
 And an active
community
 Lots of modules for
different services
(sometimes more than
one)
Perl & AWS: The CPAN
 Inconsistencies
 In method naming
 Arbitrary defaults ('eu-west-1', 'us-east-1')
 Not up to date with latest APIs
 Keeping up with AWS is hard!!!
 “Not so popular” services not covered
 IAM, CloudFormation, SWF, RedShift, CloudSearch, etc
 Almost no Role support
 AWS::CLIWrapper is a good generic solution. Not native
So lets write an
entire SDK!
Building an aws sdk for Perl - Granada Perl Workshop 2014
Hard enough
You can end up with…
or
Challenges: # of services
 30+ services
 Some with 100+ API calls
 Each call with it’s parameters
 Want to return objects
 Evolution
Challenges: # of services
So lets start classifying
Challenges: Endpoints
Endpoint Type Services
Regional Services available
in a región
the rest
Single Global services 6
Challenges: WebService Types
One URL REST
Params: Query
Response: XML
17 3
Params: JSON
Response: JSON
10 1
Challenges: Signatures
Type Services
v2 2
v3https 1
cloudfront 1
v4 the rest
Challenges: API versions
 More tan one API version is live
 That’s why not-up-to-date callers still work
 RDS
 4 versions
 CloudFront
 3 versions
 EC2
 4 versions
AWS Pace of innovation
 Every month there are changes
 Changes mean APIs change (slightly)
 Very hard to keep up!
AWS Pace of innovation
 Every week there are announcements
 Changes mean APIs change (slightly)
 Very hard to keep up!
Lets start writing!
Hand write classes and
methods, and parameters
Hand write classes and
methods, and parameters
Parse docs
 After all… you would have to read them to write the
classes
Parse docs
 After all… you would have to read them to write the
classes
No published spec
 Introspect an official SDK!
 After all AWS already has read the docs for you
No published spec
 Introspect an official SDK!
 That’s your spec!
 After all AWS already has read the docs for you
Data driven SDKs!
 JS SDK has datastructures that define calls
 Proof of concept
 Win++! Boto and PHP2 too!
 Later migrate to using Boto
Data driven SDKs!
 JS SDK has datastructures that define calls
 Proof of concept
 Win++! Boto and PHP2 too!
 Later migrate to using Boto
The solutions
Modern Perl to the rescue
 Try to be very lazy
 Parameter validation: Create Moose classes that validate
the parameters passed to the call. May change in the
future.
 Got very quick results!
 Hide all possible implementation from the user
 Try not to leak implementation
 That way you can change it at will
 Meta lets you inspect the objects!
 Call objects get marshalled into datastructured via meta
 Result datastructures get marshalled into objects via meta
Roles
Modern Perl: Roles
 All functionality gets pulled in via Roles
 Code is basically in different roles, Classes are
“serialized configurations” of how to call APIs
 Makes it easy to
 Generate service classes from datastructures
 Change behaviour for tests
Roles are used for
 One global endpoint vs endpoints per region
 Caller (Query, JSON)
 Response (XML, JSON)
 Signatures (V2, V3, V4)
 IO
Aws is a class factory
Dynamic class construction
 User never constructs service classes directly
 Aws class method uses default config
my $ec2 = Aws->service(‘EC2’)->new( . . . )
Dynamic class construction
 User wants custom functionality
my $aws = Aws->new(
config => AWS::SDK::Config->new(
caller => 'Net::AWS::TestCaller‘
)
);
my $ec2 = $aws->service(‘EC2’)->new( . . . )
service loads Aws::EC2, creates a new class with TestCaller
Win: Hello to the async world
 Still playing around in examples
my $aws = Aws->new(
config => AWS::SDK::Config->new(
caller => 'Net::AWS::MojoCaller‘
)
);
my $ec2 = $aws->service(‘EC2’)->new( . . . )
my $asgs = $ec2->DescribeAutoScalingGroups;
See examples/asyncAutoScaling.pl
Win: Also going “fully async”
my $aws = Aws->new(
config => AWS::SDK::Config->new(caller => 'Net::AWS::MojoAsyncCaller')
);
my $delay = Mojo::IOLoop->delay(sub {
my ($delay, @responses) = @_;
Dumper($_) for @responses;
});
foreach my $region (
"us-east-1", "ap-northeast-1", "sa-east-1",
"ap-southeast-1", "ap-southeast-2", "us-west-2",
"us-west-1", "eu-west-1", 'invented-region') {
my $ctrail = $aws->service('CloudTrail')->new(
region => $region,
delay => $delay,
);
print "Doing a call for $regionn";
my $list = $ctrail->DescribeTrails;
}
$delay->wait;
Building an aws sdk for Perl - Granada Perl Workshop 2014
Lessons Learned
Lessons learned
 First shot with MooseX::Declare
 Error messages are HORRIBLE!
 Change to Moops didn't go well
 Finally plain old Moose
Lessons learned
 Namespace finding (still in the works)
 AWS vs Aws
 Thanks @clintongormley for the article!
Lessons learned
 Enums (still in the works)
 APIs sometimes return unexpected stuff
Lessons learned
 Abstract $request object passed around
 Finally marshalled into the UserAgents’ taste
Still open stuff
 Load time for big services (EC2)
 Not all classes will be used all the time
 Generate classes on demand
 Calling convention
 Now CamelCased
 Not so perlish
 Calling from objects (not service objects)
 $queue->DeleteQueue(); from a queue object
 Attribute Traits
 Access to Arrays and HashRefs via nicer methods
 Lots more!!!
Use AWS? Use Perl? Want to
help?
 Fork your heart out:
https://github.com/pplu/aws-sdk-perl/

More Related Content

What's hot (15)

ODP
Drilling the Async Library
Knoldus Inc.
 
PDF
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
AWS Chicago
 
PDF
Fast C++ Web Servers
Troy Miles
 
PDF
Swift Ready for Production?
Crispy Mountain
 
KEY
Akka london scala_user_group
Skills Matter
 
PDF
Resilient Applications with Akka Persistence - Scaladays 2014
Björn Antonsson
 
KEY
Building Distributed Systems in Scala
Alex Payne
 
PDF
Amazon Route53へのドメイン移管
Jin k
 
PPTX
Algebird : Abstract Algebra for big data analytics. Devoxx 2014
Samir Bessalah
 
PDF
Scala in a wild enterprise
Rafael Bagmanov
 
PDF
Scala @ TechMeetup Edinburgh
Stuart Roebuck
 
PPTX
Advanced RxJS: Animations
Ben Lesh
 
PPTX
Scala.js for large and complex frontend apps
Otto Chrons
 
PDF
Akka lsug skills matter
Skills Matter
 
PDF
Painless Persistence in a Disconnected World
Christian Melchior
 
Drilling the Async Library
Knoldus Inc.
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
AWS Chicago
 
Fast C++ Web Servers
Troy Miles
 
Swift Ready for Production?
Crispy Mountain
 
Akka london scala_user_group
Skills Matter
 
Resilient Applications with Akka Persistence - Scaladays 2014
Björn Antonsson
 
Building Distributed Systems in Scala
Alex Payne
 
Amazon Route53へのドメイン移管
Jin k
 
Algebird : Abstract Algebra for big data analytics. Devoxx 2014
Samir Bessalah
 
Scala in a wild enterprise
Rafael Bagmanov
 
Scala @ TechMeetup Edinburgh
Stuart Roebuck
 
Advanced RxJS: Animations
Ben Lesh
 
Scala.js for large and complex frontend apps
Otto Chrons
 
Akka lsug skills matter
Skills Matter
 
Painless Persistence in a Disconnected World
Christian Melchior
 

Viewers also liked (20)

PPTX
Boosting MySQL (for starters)
Jose Luis Martínez
 
PPTX
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
Jose Luis Martínez
 
PPTX
Plenv and carton
Jose Luis Martínez
 
PPTX
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
Jose Luis Martínez
 
PDF
Estilo apa 6aed_directrizes_gerais_mja
vitorneves79
 
PPTX
My music based magazine evaluation
kamar95
 
PPT
iPad Game Design -- Develop Liverpool Dec' 2011
garethjenkins
 
PPT
Pptplan morgenjuli2011 pptbehandelcoordinatoren
RIBW Arnhem & Veluwe Vallei
 
PDF
Polifonia_6.16
Ernesto Sepulveda
 
PPS
Garm2 raton sin pilas
jaiip
 
PPTX
Results for my first drafts
kamar95
 
PDF
Success factors in football
Maksim Tsurichenko
 
PPTX
Feedback from the first versions of my music
kamar95
 
PPT
Make Extra Income Online
webwhisker
 
PPT
Kutner and olsen
kamar95
 
PPTX
Bloedsomloop versie 1.0
RIBW Arnhem & Veluwe Vallei
 
PPTX
How to use photoshop
kamar95
 
PPTX
Proposal
ramcoza
 
PPT
Daniel & Ernesto's presentation
Ernesto Sepulveda
 
PPTX
My fist drafts presnetation
kamar95
 
Boosting MySQL (for starters)
Jose Luis Martínez
 
Writing plugins for Nagios and Opsview - CAPSiDE Tech Talks
Jose Luis Martínez
 
Plenv and carton
Jose Luis Martínez
 
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
Jose Luis Martínez
 
Estilo apa 6aed_directrizes_gerais_mja
vitorneves79
 
My music based magazine evaluation
kamar95
 
iPad Game Design -- Develop Liverpool Dec' 2011
garethjenkins
 
Pptplan morgenjuli2011 pptbehandelcoordinatoren
RIBW Arnhem & Veluwe Vallei
 
Polifonia_6.16
Ernesto Sepulveda
 
Garm2 raton sin pilas
jaiip
 
Results for my first drafts
kamar95
 
Success factors in football
Maksim Tsurichenko
 
Feedback from the first versions of my music
kamar95
 
Make Extra Income Online
webwhisker
 
Kutner and olsen
kamar95
 
Bloedsomloop versie 1.0
RIBW Arnhem & Veluwe Vallei
 
How to use photoshop
kamar95
 
Proposal
ramcoza
 
Daniel & Ernesto's presentation
Ernesto Sepulveda
 
My fist drafts presnetation
kamar95
 
Ad

Similar to Building an aws sdk for Perl - Granada Perl Workshop 2014 (20)

PDF
Crossing the Bridge: Connecting Rails and your Front-end Framework
Daniel Spector
 
PPTX
VAaaS
Jeremy Canale
 
PDF
Into The Box | Alexa and ColdBox Api's
Ortus Solutions, Corp
 
PDF
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Danilo Poccia
 
PDF
AWS meets Continuous Delivery
Andreas Mohrhard
 
PPT
The Future is Now: Leveraging the Cloud with Ruby
Robert Dempsey
 
PDF
A 60-mn tour of AWS compute (March 2016)
Julien SIMON
 
PDF
Building and running Spring Cloud-based microservices on AWS ECS
Joris Kuipers
 
PDF
AWS Lambda from the trenches
Yan Cui
 
PDF
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
Amazon Web Services Korea
 
PPTX
Learn you some Ansible for great good!
David Lapsley
 
PDF
DevOps
Jose Galarza
 
PDF
locize tech talk
Adriano Raiano
 
PPTX
Shipping logs to splunk from a container in aws howto
Екатерина Задорожная
 
PDF
locize tech stack
Adriano Raiano
 
PPT
Elefrant [ng-Poznan]
Marcos Latorre
 
PPTX
StrongLoop Overview
Shubhra Kar
 
PDF
Aws Lambda in Swift - NSLondon - 3rd December 2020
Andrea Scuderi
 
PPTX
Building services on AWS in China region
Roman Naumenko
 
KEY
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
SV Ruby on Rails Meetup
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Daniel Spector
 
Into The Box | Alexa and ColdBox Api's
Ortus Solutions, Corp
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Danilo Poccia
 
AWS meets Continuous Delivery
Andreas Mohrhard
 
The Future is Now: Leveraging the Cloud with Ruby
Robert Dempsey
 
A 60-mn tour of AWS compute (March 2016)
Julien SIMON
 
Building and running Spring Cloud-based microservices on AWS ECS
Joris Kuipers
 
AWS Lambda from the trenches
Yan Cui
 
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
Amazon Web Services Korea
 
Learn you some Ansible for great good!
David Lapsley
 
DevOps
Jose Galarza
 
locize tech talk
Adriano Raiano
 
Shipping logs to splunk from a container in aws howto
Екатерина Задорожная
 
locize tech stack
Adriano Raiano
 
Elefrant [ng-Poznan]
Marcos Latorre
 
StrongLoop Overview
Shubhra Kar
 
Aws Lambda in Swift - NSLondon - 3rd December 2020
Andrea Scuderi
 
Building services on AWS in China region
Roman Naumenko
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
SV Ruby on Rails Meetup
 
Ad

More from Jose Luis Martínez (10)

PDF
Being cloudy with perl
Jose Luis Martínez
 
PPTX
Modern Perl toolchain (help building microservices)
Jose Luis Martínez
 
PDF
Escribir plugins para Nagios en Perl
Jose Luis Martínez
 
PPTX
NRD: Nagios Result Distributor
Jose Luis Martínez
 
PDF
Writing nagios plugins in perl
Jose Luis Martínez
 
PPTX
Ficheros y directorios
Jose Luis Martínez
 
PPTX
DBIx::Class
Jose Luis Martínez
 
PPTX
The modern perl toolchain
Jose Luis Martínez
 
PPTX
Introducción a las Expresiones Regulares
Jose Luis Martínez
 
Being cloudy with perl
Jose Luis Martínez
 
Modern Perl toolchain (help building microservices)
Jose Luis Martínez
 
Escribir plugins para Nagios en Perl
Jose Luis Martínez
 
NRD: Nagios Result Distributor
Jose Luis Martínez
 
Writing nagios plugins in perl
Jose Luis Martínez
 
Ficheros y directorios
Jose Luis Martínez
 
DBIx::Class
Jose Luis Martínez
 
The modern perl toolchain
Jose Luis Martínez
 
Introducción a las Expresiones Regulares
Jose Luis Martínez
 

Recently uploaded (20)

PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Survival Models: Proper Scoring Rule and Stochastic Optimization with Competi...
Paris Women in Machine Learning and Data Science
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Software Development Company Keene Systems, Inc (1).pdf
Custom Software Development Company | Keene Systems, Inc.
 
PDF
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
PPTX
Manual Testing for Accessibility Enhancement
Julia Undeutsch
 
PPTX
Wondershare Filmora Crack Free Download 2025
josanj305
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
“ONNX and Python to C++: State-of-the-art Graph Compilation,” a Presentation ...
Edge AI and Vision Alliance
 
PPTX
Essential Content-centric Plugins for your Website
Laura Byrne
 
PDF
Linux schedulers for fun and profit with SchedKit
Alessio Biancalana
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
Role_of_Artificial_Intelligence_in_Livestock_Extension_Services.pptx
DrRajdeepMadavi
 
PDF
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Survival Models: Proper Scoring Rule and Stochastic Optimization with Competi...
Paris Women in Machine Learning and Data Science
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Software Development Company Keene Systems, Inc (1).pdf
Custom Software Development Company | Keene Systems, Inc.
 
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
Manual Testing for Accessibility Enhancement
Julia Undeutsch
 
Wondershare Filmora Crack Free Download 2025
josanj305
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
“ONNX and Python to C++: State-of-the-art Graph Compilation,” a Presentation ...
Edge AI and Vision Alliance
 
Essential Content-centric Plugins for your Website
Laura Byrne
 
Linux schedulers for fun and profit with SchedKit
Alessio Biancalana
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Role_of_Artificial_Intelligence_in_Livestock_Extension_Services.pptx
DrRajdeepMadavi
 
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 

Building an aws sdk for Perl - Granada Perl Workshop 2014

  • 1. Building an AWS SDK Granada Perl Workshop 2014 Jose Luis Martinez JLMARTIN on CPAN Twitter: @pplu_io [email protected]
  • 2. About me  CTO @CAPSiDE  Training Partner for AWS  Delivering AWS official training  All four AWS certifications  Real experience with real platforms  Deliver consulting and continuous operation  Writing Perl for +10 years  And still having fun with it!
  • 3. About AWS  Mostly known for EC2 and S3  But lot's more services! (+30)  Everything is an API  “Programmable datacenter”  Software Defined Everything
  • 4. About AWS  Mostly known for EC2 and S3  But lot's more services! (+30)  Everything is an API  “Programmable datacenter”  Software Defined Everything It’s the your wet dream
  • 5. Perl & AWS Bad news   No official SDK  Official ones: Ruby, PHP, Python, JS, .Net, Java  Note: python wasn't official initially!
  • 6. Perl & AWS Good news   CPAN  And an active community  Lots of modules for different services (sometimes more than one)
  • 7. Perl & AWS: The CPAN  Inconsistencies  In method naming  Arbitrary defaults ('eu-west-1', 'us-east-1')  Not up to date with latest APIs  Keeping up with AWS is hard!!!  “Not so popular” services not covered  IAM, CloudFormation, SWF, RedShift, CloudSearch, etc  Almost no Role support  AWS::CLIWrapper is a good generic solution. Not native
  • 8. So lets write an entire SDK!
  • 11. You can end up with… or
  • 12. Challenges: # of services  30+ services  Some with 100+ API calls  Each call with it’s parameters  Want to return objects  Evolution
  • 13. Challenges: # of services
  • 14. So lets start classifying
  • 15. Challenges: Endpoints Endpoint Type Services Regional Services available in a región the rest Single Global services 6
  • 16. Challenges: WebService Types One URL REST Params: Query Response: XML 17 3 Params: JSON Response: JSON 10 1
  • 17. Challenges: Signatures Type Services v2 2 v3https 1 cloudfront 1 v4 the rest
  • 18. Challenges: API versions  More tan one API version is live  That’s why not-up-to-date callers still work  RDS  4 versions  CloudFront  3 versions  EC2  4 versions
  • 19. AWS Pace of innovation  Every month there are changes  Changes mean APIs change (slightly)  Very hard to keep up!
  • 20. AWS Pace of innovation  Every week there are announcements  Changes mean APIs change (slightly)  Very hard to keep up!
  • 22. Hand write classes and methods, and parameters
  • 23. Hand write classes and methods, and parameters
  • 24. Parse docs  After all… you would have to read them to write the classes
  • 25. Parse docs  After all… you would have to read them to write the classes
  • 26. No published spec  Introspect an official SDK!  After all AWS already has read the docs for you
  • 27. No published spec  Introspect an official SDK!  That’s your spec!  After all AWS already has read the docs for you
  • 28. Data driven SDKs!  JS SDK has datastructures that define calls  Proof of concept  Win++! Boto and PHP2 too!  Later migrate to using Boto
  • 29. Data driven SDKs!  JS SDK has datastructures that define calls  Proof of concept  Win++! Boto and PHP2 too!  Later migrate to using Boto
  • 31. Modern Perl to the rescue  Try to be very lazy  Parameter validation: Create Moose classes that validate the parameters passed to the call. May change in the future.  Got very quick results!  Hide all possible implementation from the user  Try not to leak implementation  That way you can change it at will  Meta lets you inspect the objects!  Call objects get marshalled into datastructured via meta  Result datastructures get marshalled into objects via meta
  • 32. Roles
  • 33. Modern Perl: Roles  All functionality gets pulled in via Roles  Code is basically in different roles, Classes are “serialized configurations” of how to call APIs  Makes it easy to  Generate service classes from datastructures  Change behaviour for tests
  • 34. Roles are used for  One global endpoint vs endpoints per region  Caller (Query, JSON)  Response (XML, JSON)  Signatures (V2, V3, V4)  IO
  • 35. Aws is a class factory
  • 36. Dynamic class construction  User never constructs service classes directly  Aws class method uses default config my $ec2 = Aws->service(‘EC2’)->new( . . . )
  • 37. Dynamic class construction  User wants custom functionality my $aws = Aws->new( config => AWS::SDK::Config->new( caller => 'Net::AWS::TestCaller‘ ) ); my $ec2 = $aws->service(‘EC2’)->new( . . . ) service loads Aws::EC2, creates a new class with TestCaller
  • 38. Win: Hello to the async world  Still playing around in examples my $aws = Aws->new( config => AWS::SDK::Config->new( caller => 'Net::AWS::MojoCaller‘ ) ); my $ec2 = $aws->service(‘EC2’)->new( . . . ) my $asgs = $ec2->DescribeAutoScalingGroups; See examples/asyncAutoScaling.pl
  • 39. Win: Also going “fully async” my $aws = Aws->new( config => AWS::SDK::Config->new(caller => 'Net::AWS::MojoAsyncCaller') ); my $delay = Mojo::IOLoop->delay(sub { my ($delay, @responses) = @_; Dumper($_) for @responses; }); foreach my $region ( "us-east-1", "ap-northeast-1", "sa-east-1", "ap-southeast-1", "ap-southeast-2", "us-west-2", "us-west-1", "eu-west-1", 'invented-region') { my $ctrail = $aws->service('CloudTrail')->new( region => $region, delay => $delay, ); print "Doing a call for $regionn"; my $list = $ctrail->DescribeTrails; } $delay->wait;
  • 42. Lessons learned  First shot with MooseX::Declare  Error messages are HORRIBLE!  Change to Moops didn't go well  Finally plain old Moose
  • 43. Lessons learned  Namespace finding (still in the works)  AWS vs Aws  Thanks @clintongormley for the article!
  • 44. Lessons learned  Enums (still in the works)  APIs sometimes return unexpected stuff
  • 45. Lessons learned  Abstract $request object passed around  Finally marshalled into the UserAgents’ taste
  • 46. Still open stuff  Load time for big services (EC2)  Not all classes will be used all the time  Generate classes on demand  Calling convention  Now CamelCased  Not so perlish  Calling from objects (not service objects)  $queue->DeleteQueue(); from a queue object  Attribute Traits  Access to Arrays and HashRefs via nicer methods  Lots more!!!
  • 47. Use AWS? Use Perl? Want to help?  Fork your heart out: https://github.com/pplu/aws-sdk-perl/