Frank
📢 UpdateIn v0.41.0, we added the
sst.Script
construct. You can use this script to do things like seeding the database, etc.
A couple of things to note:
• The script is not run on ur local machine or on the build server, it’s run inside a Lambda function;
• The script uses your the Lambda function’s IAM credentials, not your local credentials;
• The script can run for a maximum of 15 minutes;
• The script is run on every deployment;
• Live Lambda Dev is not enabled for scripts;
new Script(this, "Script", {
function: "src/script.main",
params: {
hello: "world",
tableName: table.tableName,
},
});
Here are some more examples.George Evans
09/08/2021, 8:26 AMFrank
Frank
George Evans
09/08/2021, 6:37 PMFrank
Blake E
09/08/2021, 8:44 PMBlake E
09/08/2021, 8:44 PMBlake E
09/08/2021, 8:45 PMBlake E
09/08/2021, 8:46 PMFrank
Blake E
09/08/2021, 9:23 PMBlake E
09/08/2021, 9:23 PMBlake E
09/08/2021, 9:24 PMFrank
Guy Shechter
10/01/2021, 10:14 PMreturn {
'statusCode': 200,
'headers': {'Content-Type': 'application/json'},
'body': json.dumps({**databases})
}