Nathan
05/06/2022, 2:55 PMthdxr
05/06/2022, 2:57 PMdax-myapp-mystack
thdxr
05/06/2022, 2:57 PMSeth Geoghegan
05/06/2022, 3:14 PM"scripts": {
"start": "sst start --stage $(whoami) --profile=<SSO profile for the shared development account>",...
• In the case of a non-serverless instance based resource (e.g. RDS, OpenSearch, etc), I create a single instance of the resource that is shared across all development environments. I do this by using conditionals in my infrastructure as code that utilizes a shred instance when running locally, but create the resource otherwise. For example, from one of my stacks that creates an RDS database:
export function DbStack({ stack, app }: sst.StackContext) {
if (app.local) {
// import shared RDS instance here
const db = rds.DatabaseInstance.fromDatabaseInstanceAttributes(...)
return {db}
}
// create RDS instance here
const db = new rds.DatabaseInstance(...)
return {db}
}
Note that this will mean you need to deploy the shared instance first so it exists for everyone elses development environment. I do this by deploying the single stack to a shared
stage: yarn run sst deploy DbStack --stage=shared --profile=<my sso profile>
• I haven't yet solved the problem for EC2 deployments, but I'll need to very soon. My current idea is to treat it the very same way I treat AWS Lambda in development. That is, the compute resource runs locally, but everything else (DB's, queues, etc) runs in the cloud. I'm not sure what that looks like in practice yet, but that's where I'm going to startthdxr
05/06/2022, 3:16 PMSeth Geoghegan
05/06/2022, 3:17 PMdev
as their stage name 🙂thdxr
05/06/2022, 3:18 PMSeth Geoghegan
05/06/2022, 3:18 PMNathan
05/06/2022, 3:42 PMNathan
05/06/2022, 3:42 PMthdxr
05/06/2022, 3:42 PMBala Chalasani
05/06/2022, 11:07 PMChad (cysense)
05/07/2022, 2:45 AMNathan
05/07/2022, 12:50 PMSeth Geoghegan
05/07/2022, 3:14 PMSeth Geoghegan
05/07/2022, 3:16 PM