Dreamforce challenge

Hi there,
I’m Simone Brunozzi, Technology Evangelist at Amazon Web Services, and this blog post is about the “Mini-Hack” challenge at DreamForce 2012.

There are two challenges for you: a Basic Hack, and an Advanced Hack (which includes the basic one, plus adds some more juice).

This page is also available from this link: http://bit.ly/dreamforce-aws.

Basic Hack
Download a MySQL database dump.
Launch a MySQL instance on Amazon EC2.
Copy the database dump to the new instance.
Convert the database into a NoSQL database.
Upload the newly converted database into DynamoDB.
Query DynamoDB and retrieve the value specified below.

Advanced Hack
Launch a Web server on Amazon EC2, and create a simple Web page that allows anyone, from a Web browser, to query the DynamoDB database and read the value.

Below there are some instructions for you to complete both hacks.

Basic Hack

1) Launch an EC2 instance with MySQL pre-installed:
You can use this AMI (Amazon Machine Image) to launch a LAMP stack:
(instructions: http://wiki.bitnami.org/cloud, and also http://wiki.bitnami.org/cloud/how_to_connect_to_your_amazon_instance)
(you might also need to read: http://wiki.bitnami.org/Infrastructure_Stacks/BitNami_AMP_Stacks)
Make sure that the Security Group you’re using allows connections to port 22 (SSH).
Also, make sure your .pem file has the right permissions (on Mac OS or Linux clients):
chmod 600 keypair-useast_main.pem

2) Login to your EC2 instance:
ssh -i keypair.pem bitnami@ec2-174-129-181-67.compute-1.amazonaws.com
(note: you can name your keypair keypair.pem or in a different way)
You might want to set a root password:
sudo passwd root

3) Download the MySQL dump from here:

4) Restore the dump into your MySQL:
Use this command:
mysql -u root -p[root_password] [database_name] < dumpfilename.sql

5) Connect to MySQL, to make sure that everything is working:
mysql -uroot -pbitnami
(password is bitnami)

6) Explore the database. How can you convert it into a NoSQL database?
This part is left to the reader. It’s a challenge, right? :)

7) Upload the content into DynamoDB
You should find out what type of Schema you want to use, and then find a way to upload the content to DynamoDB.
For more info: http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/Introduction.html

8) Retrieve the phone number(s) for Simone Brunozzi and Leonardo Da Vinci.
(note that ‘Da Vinci’ uses a space between letters). Show it to the Amazon Web Services staff. Done! Give us your contact details to receive 50 US$ in AWS credits.

Advanced Hack

9) Just one quick piece of information
If you’re doing the Advanced Hack and want to use the same Bitnami AMI, just remember that the default directory for Apache on that AMI is:
Otherwise, you’re pretty much on your own. Show us what you can do!

For any question, you can drop by our AWS area within the Dev Zone.
We’ll be there during opening hours.
I will personally be there on Tuesday and Thursday.


p.s. Don’t forget that from November 27th to 29th we are having our first global AWS conference, called Re: Invent.


  1. Radu · September 20, 2012 Reply

    all said and done (ec2-23-20-32-95.compute-1.amazonaws.com/test/queryDynamoDB.php), but is there a way to get results form Dynamo ordered by first name + last name? of course we can order after retrieval, but is there a way to do it directly using the API?

  2. simone · September 20, 2012 Reply

    Well done!
    What you ask is not a native feature of DynamoDB; however, there are many workarounds. For example, you can populate a new table with the results of a first scan (with First name), and then list the second table ordering by Last name.

    • Radu · September 21, 2012 Reply

      Thanks for the reply! Yes, I kind of imagined it will be hard to do this in nosql db with fault tolerance and redundancy required by Dynamo but nice to hear from the horse’s mouth :) Anyways, nice to get my feet wet with DynamoDB (and php for that matter :), I’m using AWS extensively but mostly SQS, S3 and SimpleDB. I’m not at Dreamforce so I cannot path by your booth, got some coworkers there though and I’ll ask them to pay a visit.

Leave a Reply