Greengrass v2 upload non-file to S3 using StreamManager

0

I'm migrating our previous Greengrass v1 system to v2. We have an "upload" lambda function that's the final step for our data and its job is to upload the data to an S3 bucket. In v1 this was done with the AWS SDK using s3.putObject().

Since we're migrating to v2 it seems like a better solution to use the StreamManager to upload the data to S3. Something I don't understand though is that it seems like the only way to add the data to StreamManager is by giving it a file URL. This is the example from the docs.

const taskDefinition = new S3ExportTaskDefinition()
        .withBucket("BucketName")
        .withKey("KeyName")
        .withInputUrl("URLToFile");

The data that the upload function is operating on is coming from Redis at this point in its journey. So if I'm understanding this correctly, I'll need to get the data from Redis, write it to a file in a mounted volume of the lambda, and then give that file to the S3ExportTaskDefinition(). This seems a little involved and I'm wondering if I'm missing something here. Is there a way to simply give the StreamManager export task a buffer or string?

slynch
質問済み 5ヶ月前186ビュー
1回答
1
承認された回答

You have it correct, Stream manager's S3 upload is only for files on disk. Using Stream manager is not at all required for you to move from V1 to V2. V1 also offered the exact same Stream manager and it sounds like you weren't using it. Nothing requires you to use it now unless you're getting a benefit from it.

Cheers,

Michael

AWS
エキスパート
回答済み 5ヶ月前
profile picture
エキスパート
レビュー済み 5ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ