Frank
SST needs some speed upBy slow, do you mean the handler function is taking long to run locally in
sst start
?
RAM reach 4gbCan you see which process is this? Is it
esbuild
?gio
08/19/2021, 5:14 PMgio
08/19/2021, 5:17 PMRoss Coundon
08/19/2021, 5:18 PMFrank
it needs much time to show “Listening Request”Is it also slow if you stop the
sst start
debug process and restart it?Frank
gio
08/19/2021, 5:22 PMFrank
gio
08/19/2021, 5:24 PMgio
08/19/2021, 5:25 PMgio
08/19/2021, 5:27 PMgio
08/19/2021, 5:35 PMgio
08/19/2021, 5:35 PMFrank
Frank
gio
08/19/2021, 7:25 PMFrank
srcPath
for your functions?gio
08/20/2021, 7:16 AMexport class VehiclesApi extends sst.Api {
constructor (stack: sst.Stack, app: <http://sst.App|sst.App>, id: string) {
const definition: ApiProps = {
accessLog:
'$context.identity.sourceIp,$context.requestTime,$context.httpMethod,$context.routeKey,$context.protocol,$context.status,$context.responseLength,$context.requestId',
customDomain: {
domainName: apigatewayv2.DomainName.fromDomainNameAttributes(
stack,
'vehicles-api-domain',
{
name: '<http://api.dev.irent-autonoleggio.com|api.dev.irent-autonoleggio.com>',
regionalDomainName: '<http://app.dev.irent-autonoleggio.com|app.dev.irent-autonoleggio.com>',
regionalHostedZoneId: '<http://dev.irent-autonoleggio.com|dev.irent-autonoleggio.com>',
}
),
path: 'vehicles'
},
defaultAuthorizationType: ApiAuthorizationType.AWS_IAM,
defaultFunctionProps: {
timeout: 300,
environment: {
STAGE: app.stage
}
},
routes: {
'POST /' : 'src/vehicles-api/vehicles-api.createVehicle',
'GET /{uri}' : 'src/vehicles-api/vehicles-api.readVehicle',
'PUT /{uri}' : 'src/vehicles-api/vehicles-api.updateVehicle',
'DELETE /{uri}' : 'src/vehicles-api/vehicles-api.deleteVehicle',
'GET /' : {
authorizationType: ApiAuthorizationType.NONE,
function: 'src/vehicles-api/vehicles-api.findVehicle',
},
'GET /{start_date}/{end_date}' : {
authorizationType: ApiAuthorizationType.NONE,
function: 'src/vehicles-api/vehicles-api.listAvailableVehicles',
},
}
};
super (stack, id, definition);
this.attachPermissions(['dynamodb']);
}
}
This is my API definitiongio
08/20/2021, 7:26 AMDavid Martin
08/20/2021, 10:01 PMFrank
David Martin
08/20/2021, 10:05 PMDavid Martin
08/20/2021, 10:05 PMDavid Martin
08/20/2021, 10:06 PMFrank
David Martin
08/20/2021, 10:27 PMDavid Martin
08/20/2021, 10:27 PMFrank
Frank
gio
08/21/2021, 6:45 AM