Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Amazon Q data integration in AWS Glue 試してみた

@mujyun_furu
September 26, 2024
15

Amazon Q data integration in AWS Glue 試してみた

@mujyun_furu

September 26, 2024
Tweet

Transcript

  1. 2024年9月27日 JAWS-UG AI/ML #21:Generative AI LT大会 JAWS-UG 名古屋 古林 信吾

    Amazon Q data integration in AWS Glue 試してみた @mujyun_furu
  2. 名前 :古林 信吾(ふるばやし しんご) 所属 :JAWS-UG名古屋 役割 :System Administrator/Architect 得意分野

    :オンプレ/クラウドのインフラ運用、構築 ペット :ハリネズミ 、リチャードソンジリス ライフワーク:美味しい日本酒を呑むこと 好きな機能:Amazon EC2(好きだけど嫌い) 2 自己紹介
  3. ▪話すこと AWS Glue について Amazon Q data integration in AWS

    Glue について ▪話さないこと Amazon Q の他の機能について 3 話すこと/話さないこと
  4. 1.はじめに 2.AWS Glue とは 3.Amazon Q data integration in AWS

    Glue とは 4.試してみた 5.まとめ 4 アジェンダ
  5. 6 1.はじめに 4か月前に登壇した内容の続編 JAWS-UG東京 ランチタイムLT会 #11 「インフラエンジニアがAthenaと格闘してみた」 https://jawsug.connpass.com/event/316451/ OpsJAWS Meetup29

    ロギング、ログ管理 「インフラエンジニアが生成AIを活用してログ解析してみた」 https://opsjaws.connpass.com/event/314570/ ※QRコードから動画視聴可能
  6. 13 3.Amazon Q data integration in AWS Glue とは ⇒2024/4/30

    に GA された、Amazon Q Developer と統合して イイ感じにコード生成したり、トラブルシューティングできるというもの ただし、英語で質問
  7. 15 4.試してみた CloudWatch Logs から、サブスクリプションフィルターで Amazon Data Firehose を使い、 Amazon

    S3 にデータを格納している。 該当のデータは、Lambda を使っておらず、Firehose の解凍機能も使っていないので、不要な CloudWatch の情報が含まれている。 そのため、Amazon Athena で簡単に解析できない、JSON がネストしている状態になっている。 S3 に格納されたデータを、AWS Glue の Glue Crawlers でカタログ化した。 この後、Glue Job で Athena から解析しやすい形にデータをコンバートし、別の S3 に格納したい。 1つのデータファイルには、取得したいログが複数含まれているので、それぞれのログを改行して1つの ファイルにまとめたい。 上記内容の ETL 処理に、Glue DataCatalog の gluetest データベースの gluetest_raw_crawlergluetest202406_raw テーブルを使いたい。 ETL 後のデータは、 s3://gluetest-output の S3 に、s3://gluetest202406-raw と同じ フォルダ構成で書き出したい。 要件を満たす Glue Job の作成をお願します。
  8. 16 4.試してみた From CloudWatch Logs, the data is stored in

    Amazon S3 using Amazon Data Firehose with a subscription filter. The data in question does not use Lambda and does not use Firehose's decompression feature, so it contains unnecessary CloudWatch information. Therefore, the data is in a state of nested JSON that cannot be easily parsed by Amazon Athena. The data stored in S3 was cataloged by Glue Crawlers of AWS Glue. After this, we want to convert the data into a form that is easy to analyze from Athena with Glue Job and store it in another S3. One data file contains multiple logs that we want to retrieve, so we want to combine each log into one file with newlines. We want to use the gluetest_raw_crawlergluetest202406_raw table in the gluetest database in Glue DataCatalog for the ETL process described above. We want to export the data after ETL to S3 at s3://gluetest-output with the same folder structure as s3://gluetest202406-raw. Please create a Glue Job that meets the requirements.
  9. 20 4.試してみた AWS Glue Studio Notebook への Amazon Q Developer

    の統合  Jupyter Notebook ベース  コードをセル単位で実行し、即座に結果を確認  # から始まるコメント文1行で英語入力し、Tab+Enter すると コメント文を Amazon Q Developer が解釈し、コードを提案
  10. 23 5.まとめ  Amazon Q data integration in AWS Glue

    の良いところ • AWS 内部情報を踏まえた提案がもらえる • トラブルシューティングの解像度が高い • AWS Glue Studio Notebook で使うのが便利  改善して欲しいところ • Chat の入力文字数制限の緩和(5000文字は欲しい) • 編集中の Glue Job のコード全体を見て改善点を提案して欲しい • I'm sorry I can't continue. Please try again.