I am trying to deploy new Lambda Functions and API Gateways to AWS using the npm serverless package. The new functions are being deployed on top of previously existing functions, and new DynamoDB tables are being created along with the new lambda functions.
The deploy is failing with the following error:
An error occurred: authDB - At least one of ProvisionedThroughput, BillingMode, UpdateStreamEnabled, GlobalSecondaryIndexUpdates or SSESpecification or ReplicaUpdates is required (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException;
The 'authDB' is a table that already exists in DynamoDB. The serverless.yml file for this database table is as follows:
authDB:
Type: "AWS::DynamoDB::Table"
DeletionPolicy: Retain
Properties:
AttributeDefinitions:
- AttributeName: key
AttributeType: S
KeySchema:
- AttributeName: key
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
TableName: "auth-db"
I'm not sure as to why I am receiving this error, since the 'ProvisionedThroughput' is defined.
[UPDATE] This authDB config is the same has not been changed since it was originally deployed... the only changes to the serverless.yml aside from the new functions/database resources is the addition of the serverless-plugin-split-stacks to bypass the CloudFormation 200 resource limit. This is the configuration of the serverless-plugin-split-stacks:
custom:
splitStacks:
perFunction: true
perType: false
perGroupFunction: false