Skip to main content

Duration

SST makes it easy to specify length of time values as typed string values.

Type : number | ${number} second | ${number} seconds | ${number} minute | ${number} minutes | ${number} hour | ${number} hours | ${number} day | ${number} days

Examples

Function timeout

new Function(this, "MyFunction", {
handler: "src/lambda.main",
timeout: "20 seconds",
});

Api CORS max age

new Api(this, "MyApi", {
cors: {
allowMethods: ["GET"],
allowOrigins: ["https://domain.com"],
maxAge: "5 minutes",
}
});