Encoding and decoding base64
When you work with streaming data, you will find yourself often converting and decoding to and from base64. Being able to make these conversions is very important in data engineering.
Let's practice encoding strings to base64 and decoding them back to a string!
Printed on your console is an incoming log. You're going to practice encoding and decoding it.
Latihan ini adalah bagian dari kursus
Streaming Data with AWS Kinesis and Lambda
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
import base64
# Encode string to bytes
incoming_log_encoded = incoming_log.____()
print(f"String in bytes: \n {incoming_log_encoded} \n")