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')) !

feita há um ano274 visualizações
1 Resposta
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
ESPECIALISTA
respondido há um ano
profile picture
ESPECIALISTA
avaliado há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas