Ross Coundon
04/06/2022, 8:21 PMsst start
it deploys and starts up but then logs the message
Missing region in config
and aborts with
Process finished with exit code 130 (interrupted by signal 2: SIGINT)
The deploy command I’m using is
sst start --stage ross-dev --region eu-west-2
The stack itself looks like this:
import * as sst from '@serverless-stack/resources';
export default class WebSocketStack extends sst.Stack {
private api: sst.WebSocketApi;
private connectionsTable: sst.Table;
constructor(scope: <http://sst.App|sst.App>, id: string, props?: sst.StackProps) {
super(scope, id, props)
this.connectionsTable = this.createConnectionsTable();
this.api = this.createApi();
this.api.attachPermissions([this.connectionsTable]);
this.addOutputs({
ApiEndpoint: this.api.url
})
}
private createConnectionsTable(): sst.Table {
return new sst.Table(this, 'connections-table', {
fields: {
PK: sst.TableFieldType.STRING,
connectionId: sst.TableFieldType.STRING,
},
primaryIndex: {
partitionKey: 'PK',
}
})
}
private createApi(): sst.WebSocketApi {
return new sst.WebSocketApi(this, 'WebsocketApi', {
accessLog: false,
routes: {
$connect: "src/main/handlers/wsHandlers.webSocketHandler",
$disconnect: "src/main/handlers/wsHandlers.webSocketHandler",
sendMessage: "src/main/handlers/wsHandlers.webSocketHandler",
},
defaultFunctionProps: {
environment: {
CONNECTIONS_TABLE: this.connectionsTable.tableName,
REGION: this.region,
},
}
})
}
}
Any thoughts on what could be going on?thdxr
04/06/2022, 8:32 PMthdxr
04/06/2022, 8:32 PMthdxr
04/06/2022, 8:39 PMRoss Coundon
04/06/2022, 8:43 PMRoss Coundon
04/06/2022, 8:46 PMFrank
Jared Utah
04/06/2022, 9:02 PMFrank
AWS_REGION
manually. Give it a try and let me know if it works for you.Ross Coundon
04/07/2022, 6:35 AMJared Utah
04/07/2022, 2:19 PM