[英]Trouble creating DynamoDB on AWS Elastic Beanstalk with Python
我正在尝试将Python Flask应用程序部署到Elastic Beanstalk并在配置文件中创建DynamoDB表和SQS队列。 我已经设置了我的配置文件(类似于https://github.com/awslabs/eb-py-flask-signup/blob/master/.ebextensions/setup.config ):
Resources:
EmailsTable:
Type: AWS::DynamoDB::Table
Properties:
KeySchema:
HashKeyElement:
AttributeName: "email"
AttributeType: "S"
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
NewBatchQueue:
Type: "AWS::SQS::Queue"
files:
"/var/app/app.config":
mode: "000444"
owner: "apache"
group: "apache"
content: |
AWS_REGION = '`{ "Ref" : "AWS::Region"}`'
EMAIL_TABLE = '`{ "Ref" : "EmailsTable"}`'
option_settings:
"aws:elasticbeanstalk:application:environment":
"APP_CONFIG": "/var/app/app.config"
我已将默认角色策略设置为接受DynamoDB(即通过允许dynamodb:"*"
),但是当我使用git aws.push
推送时,我在AWS控制台上收到以下错误: Service:AmazonCloudFormation, Message:Stack named 'awseb-e-79sqgmxq6p-stack' aborted operation. Current state: 'UPDATE_ROLLBACK_IN_PROGRESS' Reason: The following resource(s) failed to create: [EmailsTable].
Service:AmazonCloudFormation, Message:Stack named 'awseb-e-79sqgmxq6p-stack' aborted operation. Current state: 'UPDATE_ROLLBACK_IN_PROGRESS' Reason: The following resource(s) failed to create: [EmailsTable].
关于为什么会发生这种情况的任何想法?
没关系,原来我有一个缩进错误。 线
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
应该缩进一个
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.