Migrating from 0.5.6 to 1.x … so far I’ve been enjoying a lot of the features of serverless.yml. I am attempting a simple deployment of some shared resources … without success. I’ve got a set of default aws credentials configured, with administrator access … sls deploy
gets to the point of “Updating Stack…”, and I get this error:
Serverless Error ---------------------------------------
Invalid template property or properties [DwollaDb, ActivitiesDb]
Strange thing is, everything looks correct … it’s not that different from the example in the Serverless documentation, and the generated cloudFormation template looks fine:
serverless.yml:
# Resources common to all stages of irh
service: irh-resources
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
# frameworkVersion: "=X.X.X"
provider:
name: aws
runtime: nodejs4.3
stage: resources # default stage, can be overridden with serverless deploy -s xxx
region: us-east-1 # default region, can be overridden with serverless deploy -r xxx
functions:
resources:
ActivitiesDb:
Type: AWS::DynamoDB::Table
Properties:
TableName: irh-Activities-1.0
AttributeDefinitions:
- AttributeName: activityId
AttributeType: S
KeySchema:
- AttributeName: activityId
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
DwollaDb:
Type: AWS::DynamoDB::Table
Properties:
TableName: irh-Dwolla
AttributeDefinitions:
- AttributeName: id
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
Outputs:
DwollaDb:
Description: Table name for Dwolla DynamoDB database
Value:
Ref: DwollaDb
ActivitiesDb:
Description: Table name for Activities DynamoDB database
Value:
Ref: ActivitiesDb
compiled-cloudformation-template.json (beautified):
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "The AWS CloudFormation template for this Serverless application",
"Resources": {
"ServerlessDeploymentBucket": {
"Type": "AWS::S3::Bucket"
}
},
"Outputs": {
"ServerlessDeploymentBucketName": {
"Value": {
"Ref": "ServerlessDeploymentBucket"
}
},
"DwollaDb": {
"Description": "Table name for Dwolla DynamoDB database",
"Value": {
"Ref": "DwollaDb"
}
},
"ActivitiesDb": {
"Description": "Table name for Activities DynamoDB database",
"Value": {
"Ref": "ActivitiesDb"
}
}
},
"ActivitiesDb": {
"Type": "AWS::DynamoDB::Table",
"DeletionPolicy": "Delete",
"Properties": {
"TableName": "irh-Activities-1.0",
"AttributeDefinitions": [{
"AttributeName": "activityId",
"AttributeType": "S"
}],
"KeySchema": [{
"AttributeName": "activityId",
"KeyType": "HASH"
}],
"ProvisionedThroughput": {
"ReadCapacityUnits": 1,
"WriteCapacityUnits": 1
}
}
},
"DwollaDb": {
"Type": "AWS::DynamoDB::Table",
"DeletionPolicy": "Delete",
"Properties": {
"TableName": "irh-Dwolla",
"AttributeDefinitions": [{
"AttributeName": "id",
"AttributeType": "S"
}],
"KeySchema": [{
"AttributeName": "id",
"KeyType": "HASH"
}],
"ProvisionedThroughput": {
"ReadCapacityUnits": 1,
"WriteCapacityUnits": 1
}
}
}
}
Can someone see what I’m doing wrong? Thanks in advance …