Skip to main content

DocumentDB

Add a DocumentDB Cluster resource to your Altostra project

The DocumentDB Cluster resource creates a DocumentDB Cluster with at least 1 instance. To add a DocumentDB Cluster resource in the designer, go to "Database" and select the "DocumentDB Cluster" resource, or search "documentDB" in the search box:

DocumentDB Cluster Resource

Add a new DocumentDB Cluster

New DocumentDB Cluster

Name:

type: string | required

  • Altostra will use the name for generating a logical ID:
    • Only strict alpha-numeric characters will be used (by the restrictions of CFN)
    • If no alpha-numeric characters were used in the name, the logical ID will be generated by the resource type.

Username:

type: string | required

  • Choose the name of the master user for the cluster.
  • 1-63 letters or numbers.
  • The first character must be a letter.

Password:

type: secret

  • Autogenerated by Altostra.
  • The autogenerated password is stored in the Secrets Manager and accessible to any lambda connected to this DB instance.

Number of Instances:

type: integer | allowed values: 1-16 | required

  • Choose the number of instances for your cluster.

Instance Class:

| required

  • Choose the compute and memory capacity of the instances.
  • Allowed values:
    • db.t4g.medium
    • db.t3.medium
    • db.r6g.large/xlarge/2xlarge/4xlarge/8xlarge/12xlarge/16xlarge
    • db.r5.large/xlarge/2xlarge/4xlarge/8xlarge/12xlarge/16xlarge/24xlarge
    • db.r5.large/xlarge/2xlarge/4xlarge/8xlarge/16xlarge

Port:

type: integer | optional

  • Choose the port that the database engine will listening on.
  • You can set this field as a parameter.

Advanced:

Advanced

VPC Config:

optional

  • When we deploy a DocumentDB without specifying a VPC, it will be deployed to the default VPC in the region you’re working on

  • By default, DocumentDB is deployed to the default VPC in the region you’re working on.

  • If you want to deploy DocumentDB to a different VPC, you need to configure Security Groups IDs and Subnets IDs:

    • Security Group IDs:

      type: string

      • You can add multiple IDs, separated by commas.
      • Each ID must begin with “sg-”, and must exist in your AWS account.
      • You can set this field as a parameter.
    • Subnet IDs:

      type: string

      • You can add multiple IDs, separated by commas.
      • Each ID must begin with “subnet-”, and must exist in your AWS account.
      • You can set this field as a parameter.

Encryption:

Encryption
  • Enable storage encryption:

    type: boolean | default: true

    • Turn on if you want to encrypt you cluster.
  • Use default key:

    type: boolean | default: true

    • AWS KMS creates a default encryption key for your AWS account (different key for each Regions).
    • Turn on if you want to use the default KMS key.
  • Encryption Key ID:

    type: string | optional

    • If you chose to use encryption and "Use default key" is off, you need to enter the ARN of an existing KMS key.
    • You can set this field as a parameter.

Maintenance:

type: integer | default: 1 | allowed values: 1-35 | optional

Maintenance
  • The number of days for which automated backups are retained.

Deletion Protection:

type: boolean | default: true

  • Protects clusters from being accidentally deleted. If enabled, the cluster cannot be deleted unless it is modified and Deletion Protection is disabled

DocumentDB Cluster Connections:

  • A cluster cannot be connected to other resources, but a Lambda function can connect to a cluster (to read/write to it).
  • For more information about the connection go to: Lambda -> DocumentDB documentation.

To learn more about working with DocumentDB resource go to: How to use AWS DocumentDB in your Altostra projects.

Ready to Get Started?

Get Started for Free
© 2022 Altostra, Inc.