This topic gives you reference information about the Amazon DynamoDB (csb-aws-dynamodb-table, formerly csb-aws-dynamodb) service. It details the plans, configuration parameters, and binding credentials.
ImportantThe Amazon DynamoDB Table service is in beta and is intended for evaluation and test purposes only. Do not use this service in a production environment.
The default plans for Amazon DynamoDB are in the table below:
Plan | Billing Mode |
---|---|
ondemand | With on-demand capacity mode, DynamoDB is charged for the data reads and writes the application performs on the table. |
provisioned | With provisioned capacity mode, specify the number of reads and writes per second that the application is expected to require. |
When configuring Cloud Service Broker for AWS you can add additional plans. For how to configure plans, see Configure Services with Cloud Service Broker for AWS.
The following table lists parameters which can only be configured for additional plans:
Parameter Name | Values | Default |
---|---|---|
name * |
The plan name. | n/a |
id * |
A unique GUID. | n/a |
description * |
Description of the new plan. | n/a |
display_name |
Name to use when displaying the plan in marketplace. | n/a |
free |
When false, service instances of this service plan have a cost. | true |
bindable |
Specifies whether service instances of the service plan can bind to applications. | true |
plan_updateable |
Whether the plan supports upgrading, downgrading, or sidegrading to another version. | true |
billing_mode * |
Controls how you are billed for read/write throughput and how you manage capacity. | PAY_PER_REQUEST |
* Required
You can also add any of the parameters listed in the Configuration Parameters section to your plan.
NoteIf you set a parameter at plan level, developers cannot change the value when creating or updating service instances.
You can provision an Amazon DynamoDB table by running:
cf create-service csb-aws-dynamodb PLAN-NAME SERVICE-INSTANCE-NAME -c '{"PARAMETER-NAME": "PARAMETER-VALUE"}
For example:
$ cf create-service csb-aws-dynamodb ondemand my-service -c ' { "attributes": [ {"name":"id","type":"S"}, {"name":"key","type":"S"}, {"name":"value","type":"S"} ], "global_secondary_indexes": [ { "hash_key": "key", "name": "KeyIndex", "non_key_attributes": ["id"], "projection_type": "INCLUDE", "range_key": "value" } ], "hash_key": "id", "range_key": "value", "table_name": "csb-dynamodb-test" }'
You can update the configuration parameters for a service instance by running:
cf update-service SERVICE-INSTANCE-NAME -c '{"PARAMETER-NAME": "PARAMETER-VALUE"}'
The following table lists the parameters that you can configure, by using the -c
flag, when provisioning or updating a csb-aws-dynamodb
service. The Operation column displays whether a parameter is supported for both provision and update, or for provision only:
Parameter Name | Type | Description | Default | Operation |
---|---|---|---|---|
table_name |
String | (Required) The name of the table | None | provision and update |
hash_key |
String | (Required) The key to use as the hash key | None | provision and update |
range_key |
String | (Required) The key to use as the range key | None | provision and update |
attributes |
Array | (Required) A list of attributes and their types, for example: [{"name":"id", "type":"S"}, {"name":"value", "type":"S"}] |
None | provision and update |
global_secondary_indexes |
Array | (Required) A list of global secondary indexes, for example: [{"name":"KeyIndex", "hash_key":"key", "range_key":"value", "projection_type":"INCLUDE", "non_key_attributes":["id"]}] |
None | provision and update |
local_secondary_indexes |
Array | A list of local secondary indexes, for example: [{"name":"KeyIndex", "hash_key":"key", "range_key":"value", "projection_type":"INCLUDE", "non_key_attributes":["id"]}] |
[] |
provision and update |
instance_name |
String | The name of the AWS instance to create | csb-dynamodb-INSTANCE-ID |
provision |
region |
String | This is the AWS region to deploy the service in. For more information about available regions, see the AWS documentation. | us-west-2 |
provision |
ttl_enabled |
Boolean | Whether TTL is enabled | false |
provision and update |
ttl_attribute_name |
String | The name of the table attribute to store the TTL timestamp in | "" |
provision and update |
stream_enabled |
Boolean | Indicates whether Streams are to be enabled | false |
provision and update |
stream_view_type |
String | Valid values are KEYS_ONLY , NEW_IMAGE , OLD_IMAGE , NEW_AND_OLD_IMAGES |
null |
provision and update |
server_side_encryption_enabled |
Boolean | Whether or not to enable encryption at rest using an AWS-managed KMS customer master key (CMK). | false |
provision and update |
server_side_encryption_kms_key_arn |
String | The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb. | null |
provision and update |
write_capacity |
Number | The number of write units for this table. If billing_mode is PROVISIONED , this field should be greater than 0. |
0 |
provision and update |
read_capacity |
Number | The number of read units for this table. If billing_mode is PROVISIONED , this field should be greater than 0. |
0 |
provision and update |
aws_access_key_id |
String | The AWS Access Key to use for an instance. | The value the operator entered for AWS Access Key in Ops Manager. | provision and update |
aws_secret_access_key |
String | The corresponding secret for the AWS Access Key to use for an instance. | The value the operator entered for AWS Secret Access Key in Ops Manager. | provision and update |
aws_vpc_id |
String | The Virtual Private Cloud (VPC) to connect the instance to | The default VPC | provision and update |
You can bind a service by running:
cf bind-service APP-NAME SERVICE-INSTANCE --binding-name BINDING-NAME -c '{"PARAMETER-NAME": "PARAMETER-VALUE"}'
The table below lists the parameters that you can configure, using the -c
flag, when binding to a csb-aws-dynamodb
service:
Parameter Name | Type | Description | Default |
---|---|---|---|
aws_access_key_id |
String | The AWS Access Key to use for an instance | The value the operator entered for AWS Access Key in Ops Manager |
aws_secret_access_key |
String | The corresponding secret for the AWS Access Key to use for an instance | The value the operator entered for AWS Secret Access Key in Ops Manager |
The format for binding credentials for DynamoDB is as follows:
{
"access_key_id" : "AWS-ACCESS-KEY-ID",
"secret_access_key" : "AWS-SECRET-ACCESS-KEY",
"region" : "AWS-REGION",
"dynamodb_table_name": "DYNAMODB-TABLE-NAME",
"dynamodb_table_arn" : "DYNAMODB-TABLE-ARN",
"dynamodb_table_id" : "DYNAMODB-TABLE-ID"
}