{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Amazon Kinesis Import Integration","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"amazon-kinesis-import-integration","__idx":0},"children":["Amazon Kinesis Import Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Amazon Kinesisは、AWSでストリーミングデータを扱うためのプラットフォームで、ストリーミングデータの読み込みと分析、さらにカスタムストリーミングデータアプリケーションを構築する機能を提供します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この記事では、AWS Lambdaを使用してAmazon Kinesis StreamからTreasure Dataにデータを取り込む方法について説明します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure Dataの基本的な知識"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Amazon Kinesisの基本的な知識"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"master-api-keyの取得","__idx":2},"children":["Master API keyの取得"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソールから",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/my-settings/getting-your-api-keys"},"children":["master keyを取得"]},"できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"aws-lambda-functionの設定","__idx":3},"children":["AWS Lambda functionの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://aws.amazon.com/lambda/"},"children":["AWS Lambda"]},"は、データ取り込みパイプラインの一部です。AWS Lambdaを使用することで、Amazon Kinesisからのトリガーに応答してコードを実行できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"blueprintの選択","__idx":4},"children":["Blueprintの選択"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["kinesis-process-record-pythonを選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191206-001703.7b5e0fc793f7bd5d0f760ff7b3ec3924e96307c1b40c0dd1e07ffca4a86b3374.9035ab13.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"event-sourcesの設定","__idx":5},"children":["Event Sourcesの設定"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Event source typeとしてKinesisを選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Kinesis StreamとしてストリームのNameを指定します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191206-001744.a7daf1169c2f8f31d97b45af8bef93679604ce0164d23e64c27cf569fc3e8b93.9035ab13.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"functionの設定","__idx":6},"children":["Functionの設定"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Name、Descriptionを指定します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["RuntimeとしてPython 3.xを選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191206-001809.6eb77e0b0d5bc0f498a7e3d67ecfa15c352d2d0fc9ad464cf1f5e8b42ac3aea8.9035ab13.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"lambda_handler-python-scriptの設定","__idx":7},"children":["Lambda_handler Python Scriptの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["KinesisのストリーミングイベントはPython function lambda_handler.pyによって処理され、TreasureDataはTreasure Boxesのソリューションの1つとして、Kinesis Firehoseデータストリームイベントをインポートするサンプルスクリプトを提供しています。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/treasure-boxes/tree/master/integration-box/Kinesis"},"children":["Treasure Boxesリンク"]},"からPythonスクリプトをコピー&ペーストします。READMEファイルに実行手順の詳細が記載されています。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"functionの確認","__idx":8},"children":["Functionの確認"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定を確認します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create function"]},"を選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191206-002721.06c7862bdb944c11f25917d1b86bb126dd9e6ac71cac2d8397217021546a539a.9035ab13.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"functionのテスト","__idx":9},"children":["Functionのテスト"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定後、Treasure Boxesに記載されているように、以下のイベントサンプルでfunctionをテストできます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lambda UIから1回限りのテストを行うには、以下のレコードを使用できます(Actions > Configure test event)。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"invocationId\": \"invocationIdExample\",\n  \"deliveryStreamArn\": \"arn:aws:kinesis:EXAMPLE\",\n  \"region\": \"us-west-2\",\n  \"records\": [\n    {\n      \"recordId\": \"49546986683135544286507457936321625675700192471156785154\",\n      \"approximateArrivalTimestamp\": 1495072949453,\n      \"data\": \"eyJmb28iOiAiYmFyIn0=\"\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["recordsのdataの部分は、base64エンコードされた{\"foo\": bar}に解決されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"データアップロードの確認","__idx":10},"children":["データアップロードの確認"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データが正常にインポートされたことを確認するには:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure コンソール > Databasesに移動します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データの取り込みが完了するまで1〜3分かかります。"]}]},"headings":[{"value":"Amazon Kinesis Import Integration","id":"amazon-kinesis-import-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"Master API keyの取得","id":"master-api-keyの取得","depth":2},{"value":"AWS Lambda functionの設定","id":"aws-lambda-functionの設定","depth":2},{"value":"Blueprintの選択","id":"blueprintの選択","depth":3},{"value":"Event Sourcesの設定","id":"event-sourcesの設定","depth":3},{"value":"Functionの設定","id":"functionの設定","depth":3},{"value":"Lambda_handler Python Scriptの設定","id":"lambda_handler-python-scriptの設定","depth":3},{"value":"Functionの確認","id":"functionの確認","depth":3},{"value":"Functionのテスト","id":"functionのテスト","depth":3},{"value":"データアップロードの確認","id":"データアップロードの確認","depth":2}],"frontmatter":{"seo":{"title":"Amazon Kinesis Import Integration"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/amazon-kinesis-import-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}