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

質問済み 1年前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
エキスパート
回答済み 1年前
profile picture
エキスパート
レビュー済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ