CloudFormation模板是否有保留字,变量等?我已经指定了名为" Config":
的DynamoDB表 # ...standard CF definition
Resources:
# ...other resources that correctly build
Config:
Type: AWS::DynamoDB::Table
Properties:
TableName: my-app-config
AttributeDefinitions:
- AttributeName: name
AttributeType: S
KeySchema:
- AttributeName: name
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
...并应用了模板,但未创建资源。我在CloudFormation控制台中看不到任何错误。
答案 0 :(得分:1)
您的资源名称(Config
)不应导致任何问题。
Config
资源必须嵌套在Resources
对象下,如下所示:
---
AWSTemplateFormatVersion: '2010-09-09'
Description: My Stack
Resources:
Config:
Type: AWS::DynamoDB::Table
Properties:
TableName: my-app-config
AttributeDefinitions:
- AttributeName: name
AttributeType: S
KeySchema:
- AttributeName: name
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1