Amazon DynamoDB
Developer Guide (API Version 2012-08-10)

Launch DynamoDB Storage Backend for Titan with Gremlin Server on Amazon EC2 by using a AWS CloudFormation template

You can use the AWS Management Console to launch an AWS CloudFormation stack from a template to launch Titan with Gremlin Server on an instance type of your choice in Amazon EC2. This stack requires a pre-existing IAM Role that has Amazon S3 read access to your gremlin-server.yaml configuration file and DynamoDB full access to create tables, and read and write items in these tables.

The Network ACL of the VPC includes just enough access to allow:

  • An SSH connection to the instance.

  • The EC2 instance to download yum updates from central repositories (HTTP outbound).

  • The EC2 instance to download your gremlin-server.yaml and the Gremlin Server package from S3 (HTTPS outbound).

  • The EC2 instance to connect to DynamoDB (HTTPS outbound).


  • An SSH key for Amazon EC2 instances must exist in the region you plan to create the Gremlin Server stack.

  • The name and path of an IAM role in the region that has Amazon S3 Read access and DynamoDB full access, the very minimum policies required to run this CloudFormation stack. Amazon S3 read access is required to provide the file to the stack in cloud-init. DynamoDB full access is required because the DynamoDB Storage Backend for Titan must create and delete tables, and read and write data in those tables.

  • An Amazon S3 bucket with the gremlin-server and files containing your settings. These files are in the server/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server.

    For more information on creating and uploading to Amazon S3, see the Working with Amazon S3 Buckets


The AWS CloudFormation template downloads repackaged versions of, and .

The DynamoDB Storage Backend for Titan and its dependencies have been added to the default distributions. They are available for download from the following websites:

To launch Gremlin Server on Amazon EC2 using AWS CloudFormation

  1. Choose the following link to view the AWS CloudFormation template that creates a Gremlin Server stack using the DynamoDB Storage Backend for Titan:

    View Version 1.0.0 Template

  2. When you are ready to launch the stack, choose this button

  3. On the Select Template page, choose Next.


    This walkthrough uses the default settings. However, this page lets you customize the name of the AWS CloudFormation stack, or use a different template.

  4. On the Specify Parameters page, specify the following:

    • EC2 Instance Type

    • The network whitelist pattern for Gremlin Server Websockets port

    • The Gremlin Server port, default 8182.

    • The S3 URL to your configuration file

    • The name of your pre-existing EC2 SSH key

    • The network whitelist for the SSH protocol. You will need to allow incoming connections via SSH to enable the SSH tunnels that will secure Websockets connections to Gremlin Server.


      The default CIDR,, blocks SSH access from all ip addresses. You will need to specify a proper address range. For more information, see Authorizing Inbound Traffic for Your Linux Instances.

    • The path to an IAM role that has the minimum amount of privileges to run this CloudFormation script and run Gremlin Server with the DynamoDB Storage Backend for Titan. This role will require S3 read to get the file, and DynamoDB full access to create tables and read and write items in thos

    You can change the Network whitelist and Amazon EC2 instance type.

  5. On the Options page, choose Next.


    For this walkthrough, you use the default settings.

  6. On the Review page, select I acknowledge that this template might cause AWS CloudFormation to create IAM resources, and then choose Create.


    This AWS CloudFormation template does not create IAM resources.

  7. While the stack is deploying, you can monitor its progress by going to the AWS CloudFormation console and viewing the Status column for the Amazon EC2 instance.

  8. When stack creation is complete, go to the Outputs tab of your new stack.

  9. Copy the SSH tunnel command from the CloudFormation script Outputs and use it to create an SSH tunnel from your localhost port 8182 to the Gremlin Server port (8182) on the EC2 host after the stack deployment is complete.

  10. Continue the [ERROR]: xref (Tools.TitanDB.DownloadingAndRunning.Marvel) does not have an endterm or text for the link (target element: procedure). See Tools.TitanDB.GremlinServerEC2 to view the link "" found under "Launch DynamoDB Storage Backend for Titan with Gremlin Server on Amazon EC2 by using a AWS CloudFormation template" id="Tools.TitanDB.GremlinServerEC2" in file 'Tools.xml'. section in the previous topic starting from Step 5.

Now that you have the Gremlin Server on EC2, you can start working with Titan. Here are some options for continuing:

Follow Titan Getting Started tutorial

Go to the Titan Getting Started documentation and then follow the rest of the setup process, starting from the Global Graph Indices section.

Follow the Gremlin examples

To learn more about Gremlin, repeat the steps of this section and follow the examples in the Gremlin documentation.


You need to prepend each command with :> to remotely execute the commands on the Gremlin Server endpoint.

Experiment with the Marvel graph

To work with the Marvel Social Graph data, repeat steps of this section and then follow steps 5 through 14 of the Marvel graph section.

Learn more about the DynamoDB Storage Backend for Titan

For more information, start with the Storage in Local DynamoDB vs. the Amazon DynamoDB Service section.