O'Reilly logo

Scalable Cloud Ops with Fugue by Josha Stella

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reducing Redundancy in Refuge ASGs and Beyond

Let’s apply more of what you’ve learned to our Refuge composition. Looking at the code, we can see that there are many similarities between the refuge-web-app, refuge-api, and refuge-notifiication-worker services. Namely, each is composed of the following resources:

  • AutoScalingGroup

  • LaunchConfiguration

  • SecurityGroup

  • InstanceProfile (and associated role and policy)

A few differences aside, all of these resources are configured in pretty much the same way. Let’s pull that common structure out to a function, both to reduce duplication and to allow us to focus on the interesting parts of our services, rather than the boilerplate they have in common. We’ll use an approach similar to the loadbalancer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required