base64encode in StepFunction

0

Is there anyway to base64encoder a string with more than 10,000 character. Currently, AWS State Language supports base64encode function but there is a limit for that. How it's possible to base64encoder without using any lambda in StepFunction? Is there any resource exists in AWS to do the base64encode?

I have a StepFunction which read the file from S3 Bucket (getObject) and I want to attach the file to an Email by using the SendRawEmail and for that I need to base64 encode the file.

Maybe I can use Athena by using the to_base64(to_utf8('FILEDATA')) !

posta un anno fa406 visualizzazioni
1 Risposta
0

Hi, you're right in the fact that there is a 10k limit for base64encode in AWS State Language. So, you may want to pre-encode you file: you can have a S3 Lambda activated when the original file is written to the bucket. This Lambda will encode the original file to a base64 version with a standard naming convention.

Then. when your Step function will attach to attach the original file, it shift the name to the name of the encoded one using the convention and attach this one.

S3 with Lambda: https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html

profile pictureAWS
ESPERTO
con risposta un anno fa
profile picture
ESPERTO
verificato un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande