Skip to content

Instantly share code, notes, and snippets.

@iacosta
Last active December 29, 2020 23:39
Show Gist options
  • Save iacosta/090fb8a95fccfbbbeef67d248e2c8b5a to your computer and use it in GitHub Desktop.
Save iacosta/090fb8a95fccfbbbeef67d248e2c8b5a to your computer and use it in GitHub Desktop.
Deplegando una base de datos DynamoDB en AWS con CloudFormation
AWSTemplateFormatVersion : "2010-09-09"
Parameters:
DynamoAtributo:
Type: String
NombreDynamo:
Type: String
Resources:
DynamoDesdeCero:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
# Esquema de claves para la tabla y los índices
# !Ref = Parameters
- AttributeName: !Ref DynamoAtributo
#Nombre del atributo, Obligatorio, Lo obtenemos como parametro
AttributeType: S
# S = string
KeySchema:
#
- AttributeName: !Ref DynamoAtributo
KeyType: HASH
# Como nos va a cobrar el recurso
BillingMode: PAY_PER_REQUEST
SSESpecification:
# Cifra la base de datos
SSEEnabled: true
TableName: !Ref NombreDynamo
#Tags:
#- Tag
#TimeToLiveSpecification:
#TimeToLiveSpecification
# Exportar Nombres
Outputs:
NombreDynamo:
Value: !Ref DynamoDesdeCero
Export:
Name: NombreDynamo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment