await downloadObject()

in packages/api/src/index.ts [178:211]


			await downloadObject(
				s3Client,
				config.app.sourceMediaBucket,
				s3Key,
				tempPath,
			);
			const duration = await getFileDuration(tempPath);

			const signedUrl = await getSignedDownloadUrl(
				config.aws.region,
				config.app.sourceMediaBucket,
				s3Key,
				604800, // one week in seconds
				// NOTE presigned urls will expire before a week has elapsed
				// because of this issue
				// https://repost.aws/knowledge-center/presigned-url-s3-bucket-expiration
				// Can we just give workers read permission to the entire bucket?
			);
			const sendResult = await generateOutputSignedUrlAndSendMessage(
				s3Key,
				sqsClient,
				config,
				userEmail,
				body.data.fileName,
				signedUrl,
				body.data.languageCode,
				body.data.translationRequested,
				body.data.diarizationRequested,
				duration,
			);
			if (isSqsFailure(sendResult)) {
				res.status(500).send(sendResult.errorMsg);
				return;
			}