{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Aws Elastic Beanstalk 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":"aws-elastic-beanstalk-import-integration","__idx":0},"children":["Aws Elastic Beanstalk Import Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By combining AWS Elastic Beanstalk and Treasure Data, you can achieve scalability in both your front-end and back-end systems immediately."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Treasure Data"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of AWS Elastic Beanstalk"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"installing-treasure-agent","__idx":2},"children":["Installing Treasure Agent"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow the instructions below to install Treasure Agent (td-agent) our streaming data collector, into your application."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"whats-td-agent","__idx":3},"children":["What's td-agent?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data's td-agent is a distributed log collector that is required for use of Treasure Data on your AWS Elastic Beanstalk container. You use td-agent to import logs from your AWS Elastic Beanstalk application to Treasure Data's cloud data warehouse."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installation","__idx":4},"children":["Installation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A boilerplate application to install td-agent within your container is available in the following repository:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/elastic-beanstalk-td-agent"},"children":["treasure-data/elastic-beanstalk-td-agent"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"install-ebextensions-scripts","__idx":5},"children":["Install .ebextensions Scripts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Download two files from github as shown in the following example and put the files in your .ebextensions directory."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ cd $YOUR\\_REPO\n$ mkdir -p .ebextensions\n$ wget -O.ebextensions/0-td-agent-gen-config.config '<https://raw.github.com/treasure-data/elastic-beanstalk-td-agent/master/.ebextensions/0-td-agent-gen-config.config>'\n$ wget -O.ebextensions/1-td-agent-install.config '<https://raw.github.com/treasure-data/elastic-beanstalk-td-agent/master/.ebextensions/1-td-agent-install.config>'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"set-your-api-key","__idx":6},"children":["Set Your API Key"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Next, put your API key in the appropriate location within your configuration file."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td apikey:show\n$ emacs .ebextensions/0-td-agent-gen-config.config\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"deploy","__idx":7},"children":["Deploy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Finally, deploy the changes into production."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ git add .ebextensions/0-td-agent-gen-config.config\n$ git add .ebextensions/1-td-agent-install.config\n$ git commit -a -m 'custom extensions to install td-agent'\n$ git aws.push\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"confirm-data-upload","__idx":8},"children":["Confirm Data Upload"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can import logs from your local system into Treasure Data by issuing curl commands."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n$ curl -X POST -d 'json={\"action\":\"login\",\"user\":2}' http://localhost:8888/td.testdb.www\\_access\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After a few minutes (usually about 5 minutes), you can issue the following command to confirm that your data has been uploaded into the cloud. If the count is greater than zero, the data upload succeeded."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td tables testdb\n+----------+-------------------------+------+-------+----------------+\n| Database | Table | Type | Count | Schema |\n+----------+-------------------------+------+-------+----------------+\n| testdb | www\\_access | log | 5 | |\n+----------+-------------------------+------+-------+----------------+\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"importing-data-from-applications","__idx":9},"children":["Importing Data from Applications"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You’re now ready to import data from your applications to Treasure Data via td-agent. Choose the appropriate logger for your application’s language."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Supported Languages"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/ruby-apps-import-integration"},"children":["Ruby"]}," or ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/rails-apps-import-integration"},"children":["Rails"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/java-apps-import-integration"},"children":["Java"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/perl-apps-import-integration"},"children":["Perl"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/python-apps-import-integration"},"children":["Python"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/php-apps-import-integration"},"children":["PHP"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/scala-apps-import-integration"},"children":["Scala"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/node-js-apps-import-integration"},"children":["Node.js"]}]}]}]},"headings":[{"value":"Aws Elastic Beanstalk Import Integration","id":"aws-elastic-beanstalk-import-integration","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":1},{"value":"Installing Treasure Agent","id":"installing-treasure-agent","depth":1},{"value":"What's td-agent?","id":"whats-td-agent","depth":2},{"value":"Installation","id":"installation","depth":2},{"value":"Install .ebextensions Scripts","id":"install-ebextensions-scripts","depth":3},{"value":"Set Your API Key","id":"set-your-api-key","depth":3},{"value":"Deploy","id":"deploy","depth":3},{"value":"Confirm Data Upload","id":"confirm-data-upload","depth":2},{"value":"Importing Data from Applications","id":"importing-data-from-applications","depth":1}],"frontmatter":{"seo":{"title":"Aws Elastic Beanstalk Import Integration"}},"lastModified":"2025-11-13T08:46:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/aws-elastic-beanstalk-import-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}