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
asked 4 months ago167 views
1 Answer
1
Accepted Answer

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
EXPERT
answered 4 months ago
profile picture
EXPERT
reviewed 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions