Cheap and reproducible testing environments on AWS

Giorgio Sironi

If you are looking at these slides on your pc, there are speaker notes in the HTML

Giorgio Sironi (@giorgiosironi)

I work for eLife Sciences
Italy European Union
  • Software Engineer in Test (automates stuff for a living)
  • What do I do
    • Distributed systems
    • Automated complex tests, integrating many different projects
    • Continuous Delivery
    • Pasta and risotto

An unreadable diagram

Production environment


End2end environment


Ci environment

Breaking the bank


I have an objection


  • Containers
  • "Serverless"
  • Travis CI (and similar)
To the cloud!
Server-based resources Shared resources
Web servers, databases Queues, CDNs, ...
EC2, RDS, ElastiCache S3, SQS, CloudFront
Pay by the hour Pay per use
Optimize Don't worry about it
A phoenix dies and rises from its ashes


EC2 lifecycle

Lifecycle of an EC2 instance, showing start and stop commands and their transitions

Costs EC2 vs EBS

t2.small $0.74/day
t2.medium $1.46/day
t2.large $2.88/day
t2.xlarge $5.86/day
c4.4xlarge $23.93/day
SSD gp2, 10 GB $1.20/month


aws ec2 start-instances --instance-ids i-1234567890
// poll for started state:
aws ec2 describe-instances --instance-id i-1234567890
// poll with ssh that you can connect
// (optionally) poll for some smoke test to pass
// update DNS with new public ip


aws ec2 stop-instances --instance-ids i-1234567890
// poll for stopped state:
aws ec2 describe-instances --instance-ids i-1234567890
Lock system: Jenkins and Lockable resources plugin

There's more!


  • Know the pain points of your cloud architecture
  • Work to solve these problems leveraging its strengths
  • Optimize in the right place


I work for eLife Sciences

@giorgiosironi @eLife

We are hiring!

Image credits