Tomasz Michalak
10/06/2021, 10:34 AMAPI
and Function
constructs.
The use case:
1. Create VPC with all subnet configuration once.
2. Deploy all SST stacks (created per PR) to the same VPC, Lambdas should be deployed to the specific subnets.Frank
Frank
Tomasz Michalak
10/12/2021, 8:44 AMconst vpc = ec2.Vpc.fromLookup(this, 'preferences-vpc', { vpcId: 'xxx' });
const myFunction = new sst.Function(this, "myFunction", {
handler: 'src/lambda.handler',
vpc: vpc
});
const api = new sst.Api(this, "Api", {
routes: {
"GET /": myFunction,
},
});
Frank