0

I'm using AWS Codestar setup and I would like to add a database.config to my .ebextentions folder in my rails project.

If you're wondering why I'm not adding database trough console, the Codestar's pipeline fails at the final ExecuteChangeSet stage for CloudFormation changes and throws a 404 error, I assume CodePipeline looking for the previous instance.

Error Message I've been receiving AWS suggests I edit Elastic Beanstalk directly. Really somewhat lost how I can add a database to my project using Elastic Beanstalk while not breaking Codestars CodePipline ExecuteChangeSet.

You specified the 'AWSEBRDSDBInstance' resource in your configuration to create a database instance, 
without the corresponding database security group 'AWSEBRDSDBSecurityGroup'. For a better way to add
and configure a database to your environment, use 'eb create --db' or the Elastic Beanstalk console 
instead of using a configuration file.

My .ebextensions/database.config file so far.

Resources:
    AWSEBRDSDatabase:
        Type: AWS::RDS::DBInstance
        Properties:
            AllocatedStorage: 5
            DBInstanceClass: db.t2.micro
            DBName: phctest
            Engine: postgresql
            EngineVersion: 10.4
            MasterUsername: username
            MasterUserPassword: password

I could also make a separate RDS database on it's own I thought about that, but like to leave it for Elastic Beanstalk.

bradpotts
  • 329
  • 1
  • 14

0 Answers0