ablog

不器用で落着きのない技術者のメモ

2020-04-08から1日間の記事一覧

Amazon EC2 の EBS 帯域幅

AWS

20190305 AWS Black Belt Online Seminar Amazon EC2 from Amazon Web Services Japan 20190305 AWS Black Belt Online Seminar Amazon EC2 from Amazon Web Services Japan https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/ebs-optimized.html

Python で関数の戻り値でハンドリングする

コードサンプル def decrypt(decoded, plaintext): (中略) if len(entries) > 0: return entries else: return None (中略) def lambda_handler(event, context): (中略) data = decrypt(decoded, decrypt_result[u'Plaintext']) if data is not None:…

AttributeError: 'str' object has no attribute 'read'

事象 Aurora PostgreSQL互換のアクティビティストリームを Kinesis Firehose で S3 に出力し、Lambda で読んで JSOn コード def load_iter(text: str) -> Generator: size = len(text) decoder = JSONDecoder() index = 0 while index < size: obj, offset =…

Kinesis Firehose S3 に出力した JSON を Python でパースする

from json.decoder import WHITESPACE, JSONDecoder from typing import Generator def load_iter(text: str) -> Generator: size = len(text) decoder = JSONDecoder() index = 0 while index < size: obj, offset = decoder.raw_decode(text, index) yield…