0

I'm trying to deploy my Python Flask application to Elastic Beanstalk and create a DynamoDB table and SQS Queue in the config file. I've set up my config file (similar to https://github.com/awslabs/eb-py-flask-signup/blob/master/.ebextensions/setup.config) like this:

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"

I've set my default role policy to accept DynamoDB (i.e. by allowing dynamodb:"*"), but when I push using git aws.push I get the following error on my AWS console: 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].

Any thoughts as to why this could be happening?

1 Answer 1

1

Nevermind, turns out I had an indentation error. The lines

ProvisionedThroughput:
  ReadCapacityUnits: 1
  WriteCapacityUnits: 1

should have been indented one out

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.