Hey there,
I’m fairly new to serverless. I have python functions deployed, and that’s all working well. Now I’m trying to setup and use an RDS resource. Here’s where I’m getting stuck. I’ve successfully created an RDS instance, but I’m at a loss for how I’m supposed to auto-discover the DATABASE_URL to connect to it. I presume there’s a special ${…} syntax I can use in the environment section .
Any help much appreciated!
My configuration looks like this:
resources:
Resources:
MarketDB:
Type: AWS::RDS::DBInstance
Properties:
DBName: "MarketDB"
AllocatedStorage: "5"
DBInstanceClass: "db.t2.small"
Engine: "MySQL"
EngineVersion: "5.7.22"
MasterUsername: "xxx"
MasterUserPassword: "xxx"
DeletionPolicy: "Snapshot"
Cheers,
Hitechbunny