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
preguntada hace 5 meses186 visualizaciones
1 Respuesta
1
Respuesta aceptada

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
EXPERTO
respondido hace 5 meses
profile picture
EXPERTO
revisado hace 5 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas