When transforming a payload from one form to another it’s often necessary to map various fields. An example of this may be as simple as mapping from a country code to the full name of said country, i.e. AUS to Australia.
There several ways to achieve this, some more flexible than others.
To use the example of country code mapping, here’s the input data that we’re required to map/transform:
This post is the next in the series on Cloudifying MoinMoin and Scheduling an ASG, here we Update the DNS record automatically upon the provisioning of an instance.
Now that we’ve got everything up and running on the schedule that we want, and being automatically replaced upon failure, we need to ensure our domain alias A record i.e. wiki.easyas.info gets updated with the IP of each new instance as they’re provisioned.
This post builds on Cloudified MoinMoin further where we’re going to schedule the application to be down at certain times of the day/week. A relatively new feature of CloudFormation templates is the AWS::AutoScaling::ScheduledAction block, which allows us to alter the MinSize and MaxSize properties of the AutoScalingGroup.
This can be useful in a number of settings, but perhaps a good example is an internal webapp for a business where there are quite clear “business hours” where it’s critical to have the application up and responsive all day long.
This post takes the Installing MoinMoin on Nginx and uWSGI post further by deploying the built instance of MoinMoin within an AutoScalingGroup (ASG).
Creating the AMI From my previous post of we have come out with a running instance configured as desired. The only trouble with this situation is that it’s a snowflake.
First step to producing a server that can be repeatedly recreated is to take a snapshot of the instance, this is as simple as choosing so in the AWS console and giving it a name.