The Dynamic DynamoDB project is today releasing an AWS CloudFormation template to make it as easy as possible to get started with Dynamic DynamoDB. Dynamic DynamoDB is a popular open source product that provides auto scaling for AWS DynamoDB.

The template will launch a t1.micro EC2 instance with the latest version of Dynamic DynamoDB pre-installed. All you need to do is to provide a configuration file to use, the rest is handled automatically.

You can read more and get started with the CloudFormation template in the project documentation.

If you have any issues, please feel free to submit an issue at the project’s GitHub Issues page.

Happy auto scaling!

Recently I created a CloudFormation template with a Windows server with authentication towards Active Directory. You can use the following snippet to achieve that:

I am also adding users from the domain group ServerAdmin to the local computers Administrators group.

I recently needed to convert an AWS instance-store AMI to an EBS backed AMI. Here’s the steps I took in order to fix that. It’s a ext3 file system in this example, but it should work fine with an ext4 as well.

  1. Launch your instance-store AMI
  2. Create a new EBS in the same availability zone
  3. Attach the EBS to the instance-store instance on `/dev/sdh`
  4. Create the file system
  5. mkfs.ext3 /dev/sdh
  6. Mount the device
  7. mkdir /mnt/ebs
        mount /dev/sdh /mnt/ebs
  8. Shut down any running applications or databases that you have
  9. rsync your system to the EBS volume
  10. rsync -avHx / /mnt/ebs
        rsync -avHx /dev /mnt/ebs
  11. Label the device
  12. tune2fs -L '/' /dev/sdh
  13. Sync and unmount the device
  14. sync;sync;sync;sync && umount /mnt/ebs
  15. In the AWS Console, make a snapshot of the EBS drive
  16. Make a note of the AKI and ARI of the currently running instance (skip this if none are set)
  17. When the snapshot is complete, right click on it and choose "Create Image from Snapshot"
  18. Use the wizard to set an name and description of your new AMI. Also choose the right AKI etc.
  19. You should now be able to start a new instance from the newly created AMI.

I had some problems finding out how to access parent data in MeteorJS. Consider the following code:

The collection we have for this look like this:

As we iterate over cars, this will be set to the current car object. But in order to remove the car from the Garage collection, we will need the _id of the parent garage. The parent data is accessible in the template event handler. The events take an event map, and in the case of events in the template event handler you get two arguments; event and template. The template refers to template where the handler is defined (i.e. the parent template). This is the key. So to implement the removeCar button, write like this:

Note how we extract the parent ID from template.data._id.

I’m writing a project where I’m using Bootstrap 3 and MeteorJS. As MeteorJS ships with Bootstrap 2, we’re using Meteorite to handle packages.

If you haven’t installed Meteorite already, please have a look at the Meteorite README.

Install necessary packages

We will need to install three packages, one for Facebook authentication support, one for Bootstrap 3 itself and one for the accounts user interface with Bootstrap 3 support.

mrt add accounts-facebook
mrt add bootstrap-3
mrt add accounts-ui-bootstrap-3

Client HTML code

Ok, let’s take a look at the client side HTML code. I’ve two templates, one with the body text and one with the Bootstrap 3 navbar. Note how easy it is to add the loginButtons to the menu.

The application should look something like this now:


Don’t forget to configure your Facebook app according to the instructions when clicking Configure Facebook login.

Done!

That’s all you’ll need to do to get Bootstrap 3 and a Bootstrap 3 styled accounts interface up and running.