

# Step 9. Deploy the data model
<a name="step9"></a>

## Objective
<a name="obj9"></a>
+ Deploy the DynamoDB table (or tables) to the AWS Region.

## Process
<a name="proc9"></a>
+ DevOps architect creates an CloudFormation template or other infrastructure as code (IaC) tool for the DynamoDB table (or tables). CloudFormation provides an automated way to provision and configure your tables and associated resources.

## Tools and resources
<a name="tools9"></a>
+ [CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html)

## RACI
<a name="raci9"></a>


****  

| Business user | Business analyst | Solutions architect | Database engineer | Application developer | DevOps engineer | 
| --- | --- | --- | --- | --- | --- | 
| I | I | C | C |  | R/A | 

## Outputs
<a name="outputs9"></a>
+ AWS CloudFormation template

## Example
<a name="sample9"></a>

```
mySecondDDBTable:
   Type: AWS::DynamoDB::
   Table DependsOn: "myFirstDDBTable" 
   Properties:  
   AttributeDefinitions:
      -  AttributeName: "ArtistId" 
         AttributeType: "S"
      -  AttributeName: "Concert" 
         AttributeType: "S"
      -  AttributeName: "TicketSales" 
         AttributeType: "S"
   KeySchema:
      -  AttributeName: "ArtistId" 
         KeyType: "HASH"
      -  AttributeName: "Concert" 
         KeyType: "RANGE"
   ProvisionedThroughput: 
      ReadCapacityUnits:
         Ref: "ReadCapacityUnits" 
      WriteCapacityUnits:
         Ref: "WriteCapacityUnits" 
   GlobalSecondaryIndexes:
      -  IndexName: "myGSI" 
         KeySchema:
            - AttributeName: "TicketSales" 
            KeyType: "HASH"
         Projection:
            ProjectionType: "KEYS_ONLY" 
         ProvisionedThroughput: 
         ReadCapacityUnits:
            Ref: "ReadCapacityUnits" 
         WriteCapacityUnits:
            Ref: "WriteCapacityUnits" 
   Tags:
      -  Key: mykey 
         Value: myvalue
```