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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠