few-tent-80031
08/08/2022, 4:02 PMdatabase = aws.rds.Instance(
resource_name="master-thesis-rds",
allocated_storage = 5,
instance_class='db.t4g.micro',
allow_major_version_upgrade=False,
apply_immediately=False,
auto_minor_version_upgrade=True,
db_name='master',
db_subnet_group_name='db-subnet-group',
deletion_protection=False,
enabled_cloudwatch_logs_exports=['audit', 'error', 'general', 'slowquery'],
engine='mysql',
performance_insights_enabled=True,
port=5432,
publicly_accessible=False,
skip_final_snapshot=True,
vpc_security_group_ids=[db_sg.id],
username='',
password=password.value
)
Then, I did this:
rds_endpoint = database.address.apply(lambda address: f"http://{address}")
And last, I have ecs container definition with these env vars:
"environment": [
{
"name": "user", "value": ""
},
{
"name": "password", "value": f"{password.value}"
},
{
"name": "db_host_replica", "value": rds_endpoint
},
{
"name": "db_host", "value": rds_endpoint
}
],
However, when I run this, I get
TypeError: Object of type Output is not JSON serializable
Do you guys know where is a mistake? I tried different ways but I cannot get right output converted to string. Thank youbillowy-army-68599
08/08/2022, 5:06 PMfew-tent-80031
08/08/2022, 5:41 PM