How to use boto to launch an elastic beanstalk with an rds resource

房东的猫 提交于 2019-12-10 20:47:00

问题


How can I launch an elastic beanstalk application with a RDS database using boto?

I am sending the following option settings in my create_environment call but the RDS db is not launched:

    ('aws:rds:dbinstance', 'DBAllocatedStorage', '5'),
    ('aws:rds:dbinstance', 'DBEngine', 'postgresql'),
    ('aws:rds:dbinstance', 'DBEngineVersion', '9.3'),
    ('aws:rds:dbinstance', 'DBInstanceClass', 'db.t2.micro'),
    ('aws:rds:dbinstance', 'DBPassword', self.rds_password),
    ('aws:rds:dbinstance', 'DBUser', self.rds_username),

回答1:


Just specifying option settings is not sufficient to create an RDS. The option settings are used to configure settings for RDS. To create an RDS along with your beanstalk environment you have three options:

  1. Use the console
  2. Use EB CLI
  3. Use an ebextension to specify an RDS resource

First one is pretty simple. For the second one you can follow the tutorial here.

I recently responded on the third possibility here.



来源:https://stackoverflow.com/questions/26043706/how-to-use-boto-to-launch-an-elastic-beanstalk-with-an-rds-resource

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!