Reputation: 989
How does one create an rds db along with the aws cli for elastic beanstalk?
aws elasticbeanstalk create-environment
I was able to make the command create a new elastic beanstalk environment but it did not create the rds db for me. Is there something I must configure?
Upvotes: 4
Views: 360
Reputation: 6831
When calling the create-environment
endpoint, you can also specify the option --option-settings
as shown in the documentation.
All of the Option Settings can be found on this page. Specifically, look for the aws:rds:dbinstance
section to see the RDS specific ones.
An example JSON config might look like this:
[
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "DBName",
"Value": "my-database"
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "Engine",
"Value": "mysql"
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "MasterUsername",
"Value": "user"
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "MasterUserPassword",
"Value": "hunter2"
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "DBInstanceClass",
"Value": "db.m1.small"
}
// ...
]
Upvotes: 4