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

질문됨 일 년 전410회 조회
1개 답변
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
전문가
답변함 일 년 전
profile picture
전문가
검토됨 일 년 전

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

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

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

관련 콘텐츠