Created
September 5, 2024 17:26
-
-
Save diego3g/905ccae3ad6225ca56ba134253b08322 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const layers = new sst.aws.Bucket('CodeconEncodingLayers') | |
const ffmpegLayer = new aws.s3.BucketObjectv2('FFmpeg', { | |
bucket: layers.name, | |
key: 'ffmpeg.zip', | |
source: new $util.asset.FileArchive('../../src/layers/ffmpeg.tar.gz'), | |
}) | |
const lambdaLayer = new aws.lambda.LayerVersion('FFmpegLayer', { | |
s3Bucket: layers.name, | |
s3Key: ffmpegLayer.key, | |
layerName: 'ffmpeg_layer', | |
compatibleRuntimes: [aws.lambda.Runtime.NodeJS20dX], | |
}) | |
new sst.aws.Function('SampleFunction', { | |
handler: 'src/functions/sample.handle', | |
transform: { | |
function: { | |
ephemeralStorage: { | |
size: 2048, | |
}, | |
}, | |
}, | |
layers: lambdaLayer.arn.apply(arn => [arn]), | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment