feature request: support MySQL instance for AWS RDS
Is there an existing issue for this?
- [X] I have searched the existing issues
Feature description
Currently, only MariaDB instances are supported (for these engines mysql, mariadb, aurora-mysql). Add support for MySQL instances as well.
In addition to supporting a different RDS instance type, at the same time, also preferably add support for setting the instance version at deploy time (i.e. mysql:8.0.28-debian).
🧑💻 Implementation
No response
Anything else?
Looking to be able to run the following with CDK on Localstack:
instance = rds.DatabaseInstance(
self,
"MagnusDBInstance",
engine=rds.DatabaseInstanceEngine.mysql(
version=rds.MysqlEngineVersion.VER_8_0_21
),
instance_type=ec2.InstanceType("t2.medium"),
vpc_subnets=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PUBLIC),
vpc=vpc.instance,
multi_az=False,
allocated_storage=10,
database_name="magnusdb",
instance_identifier=instance_identifier,
credentials=rds.Credentials.from_secret(secret),
security_groups=[vpc.mysql_sg],
)
This would be really good, currently running into an error with our db migration script as it is not compatible with MariaDB and only MySQL
Very useful
Hey, I'm happy to take this up
I have the local Dev setup as per the docs and have gone through the codebase.
I suspect that it requires changes in moto/rds/models.py please enlighten me more on this. I'm new here
Hi @uzaxirr,
thanks for showing initiative on this issue. Unfortunately, the RDS support is a pro feature, meaning the implementation is not open-source. LocalStack Pro spins up real databases, whereas moto only provides CRUD operations for the RDS API.
@steffyP Thanks for letting me know!
Hi @RobertLucian, hi @lukonjun,
we have added support for MySQL images in the latest LocalStack image. It will run a MySQL instance in a new docker container, using the official images.
In order to enable this new feature, please set the environment variable RDS_MYSQL_DOCKER=1.
The engine-version will be used as the tag for the image - so you are free to use any version that is offered by MySQL.
Please also consider the related docs for RDS.
Please let us know, if it works for you. We would appreciate your feedback! 🙏