resources
Amazon DynamoDB
How to connect the Amazon DynamoDB NoSQL database to Noop Components.
The Amazon DynamoDB Resource is a NoSQL database solution for the Noop platform. It provides a no-configuration way to connect application services to the “Fast and flexible NoSQL database service for any scale,” DynamoDB.
Key Features
- All data is encrypted at rest and in-transit using industry standard AES-256 encryption and SSL/TLS respectively.
- Browse, query, and debug your data with the Resource Explorer for DynamoDB in the Noop Console.
- Manage access automatically for all Components referencing the Resource from the Blueprint Manifest (blueprint.yaml) file.
Usage
To add DynamoDB to your application, insert an entry in the blueprint.yaml under resources. Specify the type as dynamodb and include an alphanumeric name.
Required Parameters
DynamoDB has four required configuration parameters: name, type, hashKeyName, and hashKeyType.
name
Alphanumeric name used to reference the DynamoDB Resource from your Application Components (Services and Tasks).
type
Must be dynamodb.
hashKeyName
Alphanumeric name; hyphens and underscores are allowed. Required.
hashKeyType
One of S, N, or B.
Optional Parameters
rangeKeyName
Alphanumeric name; hyphens and underscores are allowed.
rangeKeyType
One of S, N, or B.
Example
Here’s a complete blueprint.yaml example:
components:
- name: ApiService
type: service
root: api-service/
image: node:24-alpine
build:
steps:
- copy: package*.json
destination: ./
- run: npm ci
- copy: index.js
- copy: lib/
runtime:
command: npm start
resources:
- MyTable
variables:
DYNAMO_ENDPOINT:
$resources: MyTable.endpoint
routes:
- pattern: /**
target:
component: ApiService
resources:
- name: MyTable
type: dynamodb
hashKeyName: id
hashKeyType: S
When a Resource is connected to a Noop Service, the following dynamic runtime variables are available to use within the Blueprint Manifest:
endpointtableName
To reference a Resource property, use the special $resources key. See the following example:
components:
# ...
- runtime:
resources:
- MyTable
variables:
DYNAMO_ENDPOINT:
$resources: MyTable.endpoint
As with all Noop resources, the Resource Explorer allows you to query and browse all data stored in DynamoDB. The Resource Explorer is available on the Resource page within the Noop Console. Note: the DynamoDB table is only accessible to the Components that specify it as a dependency.
Limitations
- Global Secondary Indexes are not currently available.