Seth Geoghegan
10/25/2021, 8:03 PMsst remove
operation that removes my debug-stack, but leaves my primary stack in placeSeth Geoghegan
10/25/2021, 8:03 PMRemoving stacks
[Error at /sgeoghegan-kas-kas-api-stack] Invalid parameter name. Please use correct syntax for referencing a version/label <name>:<version/label>
Found errors
There was an error synthesizing your app.
Seth Geoghegan
10/25/2021, 8:03 PMthdxr
10/25/2021, 8:10 PMthdxr
10/25/2021, 8:10 PMSeth Geoghegan
10/25/2021, 8:12 PMSeth Geoghegan
10/25/2021, 8:12 PMSeth Geoghegan
10/25/2021, 8:13 PMSeth Geoghegan
10/25/2021, 8:13 PMimport ApiStack from "./ApiStack";
import { StringParameter } from "@aws-cdk/aws-ssm";
export default function main(app) {
// Set default props for all functions in this stack
app.setDefaultFunctionProps((stack) => ({
runtime: "python3.8",
srcPath: "functions",
environment:{
SSM_PATH: "/" + app.stage + "/" + app.name,
DB_URI: get_db_uri(stack)
}
}));
new ApiStack(app, "kas-api-stack");
}
function get_db_uri(stack){
return process.env.IS_LOCAL ?
process.env.DB_URI :
StringParameter.valueFromLookup(stack,process.env.DB_URI)
}
thdxr
10/25/2021, 8:14 PMthdxr
10/25/2021, 8:14 PMSeth Geoghegan
10/25/2021, 8:14 PMSeth Geoghegan
10/25/2021, 8:15 PMget_db_uri
function returns a string to a local postgres DB when I'm running locallySeth Geoghegan
10/25/2021, 8:15 PMSeth Geoghegan
10/25/2021, 8:16 PMthdxr
10/25/2021, 8:30 PMSeth Geoghegan
10/25/2021, 8:36 PMSeth Geoghegan
10/25/2021, 8:39 PMSeth Geoghegan
10/25/2021, 8:39 PMthdxr
10/25/2021, 8:47 PMthdxr
10/25/2021, 8:48 PMSeth Geoghegan
10/25/2021, 8:48 PMthdxr
10/25/2021, 8:48 PMSeth Geoghegan
10/25/2021, 8:48 PM