I´m trying to create some unit tests on a python aws lambda proyect using moto. I´ve created an rds postgres instance using:
@pytest.fixture(scope='function')
def rds(aws_credentials):
with mock_rds():
yield boto3.client("rds", region_name="us-west-2").create_db_instance(
DBInstanceIdentifier="db-master-1",
AllocatedStorage=10,
Engine="postgres",
DBName="fox-postgres",
DBInstanceClass="db.m1.small",
LicenseModel="license-included",
MasterUsername="postgres",
MasterUserPassword="postgres",
Port=5432,
DBSecurityGroups=["my_sg"],
VpcSecurityGroupIds=["sg-123456"],
EnableCloudwatchLogsExports=["audit", "error"],
)
How do I know (or set) the host name in order to run queries? Is that even possible? I don´t know if this is a real (or almost) database instance.
Thanks in advance.