Learn how to use datasets stored in Amazon S3 with Openlayer
This guide explains how to use datasets stored in Amazon S3 bucket with Openlayer.Openlayer currently accepts datasets in two formats: pandas dataframes and CSV files. Consequently, the first step is to ensure that the data you wish to use is in one of these formats.
This is the recommended option if you can load your dataset into memory using a pandas dataframe. To retrieve your data from S3 and load it into a pandas dataframe, use the following code:
import boto3import pandas as pd# The AWS profile that has access to the S3 bucketAWS_PROFILE = "your_profile"# Information about the location of the dataset in the S3 bucketS3_BUCKET = "bucket_name"S3_KEY = "path/to/dataset.csv"session = boto3.session.Session( profile_name=AWS_PROFILE)s3 = session.client("s3")s3_data = s3.get_object( Bucket=S3_BUCKET, Key=S3_KEY)df = pd.read_csv(s3_data["Body"])
With the dataset as a pandas dataframe, you can upload it to the the platform either in
development or monitoring mode.
This is the recommended option if you prefer saving your dataset to disk instead of loading it to memory, as in the previous section. To retrieve your data from S3 and save it to disk, use the following code:
import boto3# The AWS profile that has access to the S3 bucketAWS_PROFILE = "your_profile"# Information about the location of the dataset in the S3 bucketS3_BUCKET = "bucket_name"S3_KEY = "path/to/dataset.csv"OUTPUT_FILE = "dataset.csv"session = boto3.session.Session( profile_name=AWS_PROFILE)s3 = session.client("s3")s3.download_file( Bucket=S3_BUCKET, Key=S3_KEY, Filename=OUTPUT_FILE)
With the dataset saved as a CSV file, you can upload it to the the platform either in
development or monitoring mode.
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Openlayer","colors":{"primary":"#592FEA","light":"#7A58EE","dark":"#7A58EE"},"logo":{"light":"https://mintcdn.com/openlayer-44/oDCORJdUN9f9cW5l/logo/logo-docs-brand.svg?fit=max\u0026auto=format\u0026n=oDCORJdUN9f9cW5l\u0026q=85\u0026s=ba6c0b778d2eacb6a216f9fb8caa7132","dark":"https://mintcdn.com/openlayer-44/oDCORJdUN9f9cW5l/logo/logo-docs-brand-dark.svg?fit=max\u0026auto=format\u0026n=oDCORJdUN9f9cW5l\u0026q=85\u0026s=7b5e924f18a184a4444ec36e2a23b061","href":"https://openlayer.com"},"favicon":"https://mintcdn.com/openlayer-44/kSF2u3BEB6ygCIR0/favicon.svg?fit=max\u0026auto=format\u0026n=kSF2u3BEB6ygCIR0\u0026q=85\u0026s=956d0871161771d155ff4903add290e5","api":{"openapi":["api-reference/openapi.yaml"],"playground":{"display":"none"},"mdx":{"auth":{"method":"bearer"},"server":"https://api.openlayer.com/v1"}},"appearance":{"default":"system"},"background":{"color":{"light":"#FFFFFF","dark":"#000000"}},"navbar":{"links":[{"href":"https://discord.gg/t6wS2g6MMB","label":"Community"},{"href":"https://app.openlayer.com/?login=true","label":"Log in"}],"primary":{"type":"button","label":"Get started","href":"https://app.openlayer.com/"}},"footer":{"socials":{"discord":"https://discord.gg/t6wS2g6MMB","linkedin":"https://www.linkedin.com/company/openlayerco","twitter":"https://twitter.com/openlayerco"}},"fonts":{"family":"Inter"},"icons":{"library":"lucide"},"integrations":{"mixpanel":{"projectToken":"401ce9e4de4663c33009eb3d140d3945"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"openlayer-44","hasAudioNarration":false,"actualSubdomain":"openlayer-44","customDomains":["docs.openlayer.com"],"gitSource":{"type":"github","owner":"openlayer-ai","repo":"openlayer-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aec177ab4a9a5921893f321","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"Documentation","count":197},{"language":"default","tag":"Tests","count":122},{"language":"default","tag":"Catalog","count":111},{"language":"default","tag":"Reference","count":91},{"language":"default","tag":"REST API","count":64},{"language":"default","tag":"Integrations","count":62},{"language":"default","tag":"Governance","count":35},{"language":"default","tag":"Observability","count":23},{"language":"default","tag":"CLI","count":19},{"language":"default","tag":"No-Code Platforms","count":18}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"integrations/aws-s3","slug":"/integrations/aws-s3","pageMetadata":{"title":"Amazon S3","slug":"aws-s3","hidden":false,"createdAt":"2023-04-26T17:23:49.146Z","updatedAt":"2023-09-15T21:39:40.961Z","description":"Learn how to use datasets stored in Amazon S3 with Openlayer","href":"/integrations/aws-s3","hiddenSetByFrontmatter":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to use datasets stored in Amazon S3 with Openlayer\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(OptimizedImage,{width:`700`,style:{borderRadius:`0.5rem`,display:`block`,marginLeft:`auto`,marginRight:`auto`},src:`https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/aws_hero.png?fit=max\u0026auto=format\u0026n=i_IVq7qGt9U6VbHF\u0026q=85\u0026s=12e74ba091af87ee12a7567452a96b38`,alt:`Amazon S3 hero`,\"data-og-width\":`3600`,\"data-og-height\":`1882`,\"data-path\":`images/integrations/aws_hero.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/aws_hero.png?w=280\u0026fit=max\u0026auto=format\u0026n=i_IVq7qGt9U6VbHF\u0026q=85\u0026s=656b7aee4ae7277e9d5bf84432e4437d 280w, https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/aws_hero.png?w=560\u0026fit=max\u0026auto=format\u0026n=i_IVq7qGt9U6VbHF\u0026q=85\u0026s=c3f14e12554d7d4cc5fa5bc4bb958289 560w, https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/aws_hero.png?w=840\u0026fit=max\u0026auto=format\u0026n=i_IVq7qGt9U6VbHF\u0026q=85\u0026s=10216b5633f3c22bb648b4a61a1a66d4 840w, https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/aws_hero.png?w=1100\u0026fit=max\u0026auto=format\u0026n=i_IVq7qGt9U6VbHF\u0026q=85\u0026s=8dd25562bbb70fc03293ecbafd7396a8 1100w, https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/aws_hero.png?w=1650\u0026fit=max\u0026auto=format\u0026n=i_IVq7qGt9U6VbHF\u0026q=85\u0026s=226768efb81ad9fcde7c7ebca4d48613 1650w, https://mintcdn.com/openlayer-44/i_IVq7qGt9U6VbHF/images/integrations/aws_hero.png?w=2500\u0026fit=max\u0026auto=format\u0026n=i_IVq7qGt9U6VbHF\u0026q=85\u0026s=931699a858e3072588d8bb651f4b87dd 2500w`}),`\n`,_jsxs(_components.p,{children:[`This guide explains how to use `,_jsx(_components.strong,{children:`datasets stored in Amazon S3 bucket`}),` with Openlayer.`]}),`\n`,_jsx(_components.p,{children:`Openlayer currently accepts datasets in two formats: pandas dataframes and CSV files. Consequently, the first step is to ensure that the data you wish to use is in one of these formats.`}),`\n`,_jsx(Heading,{level:`2`,id:`pull-a-dataset-from-s3-into-a-pandas-dataframe`,children:`Pull a dataset from S3 into a pandas dataframe`}),`\n`,_jsxs(_components.p,{children:[`This is the recommended option if you can `,_jsx(_components.strong,{children:`load your dataset into memory`}),` using a pandas dataframe. To retrieve your data from S3 and load it into a pandas dataframe, use the following code:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`21`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` boto3`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pandas `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pd`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The AWS profile that has access to the S3 bucket`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AWS_PROFILE = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your_profile\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Information about the location of the dataset in the S3 bucket`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`S3_BUCKET = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bucket_name\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`S3_KEY = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"path/to/dataset.csv\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`session = boto3.session.Session(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` profile_name=AWS_PROFILE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`s3 = session.client(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"s3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`s3_data = s3.get_object(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Bucket=S3_BUCKET,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Key=S3_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`df = pd.read_csv(s3_data[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`With the dataset as a pandas dataframe, you can upload it to the the platform either in\n`,_jsx(_components.a,{href:`/development/overview`,children:`development`}),` or `,_jsx(_components.a,{href:`/monitoring/overview`,children:`monitoring`}),` mode.`]}),`\n`,_jsx(Heading,{level:`2`,id:`pull-a-dataset-from-s3-into-a-csv-file`,children:`Pull a dataset from S3 into a CSV file`}),`\n`,_jsxs(_components.p,{children:[`This is the recommended option if you prefer `,_jsx(_components.strong,{children:`saving your dataset to disk`}),` instead of loading it to memory, as in the previous section. To retrieve your data from S3 and save it to disk, use the following code:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` boto3`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The AWS profile that has access to the S3 bucket`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AWS_PROFILE = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your_profile\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Information about the location of the dataset in the S3 bucket`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`S3_BUCKET = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bucket_name\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`S3_KEY = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"path/to/dataset.csv\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OUTPUT_FILE = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dataset.csv\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`session = boto3.session.Session(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` profile_name=AWS_PROFILE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`s3 = session.client(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"s3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`s3.download_file(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Bucket=S3_BUCKET,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Key=S3_KEY,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Filename=OUTPUT_FILE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`upload-to-openlayer`,children:`Upload to Openlayer`}),`\n`,_jsxs(_components.p,{children:[`With the dataset saved as a CSV file, you can upload it to the the platform either in\n`,_jsx(_components.a,{href:`/development/overview`,children:`development`}),` or `,_jsx(_components.a,{href:`/monitoring/overview`,children:`monitoring`}),` mode.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Amazon S3","slug":"aws-s3","hidden":false,"createdAt":"2023-04-26T17:23:49.146Z","updatedAt":"2023-09-15T21:39:40.961Z","description":"Learn how to use datasets stored in Amazon S3 with Openlayer","href":"/integrations/aws-s3","hiddenSetByFrontmatter":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Pull a dataset from S3 into a pandas dataframe","slug":"pull-a-dataset-from-s3-into-a-pandas-dataframe","depth":2,"children":[]},{"title":"Pull a dataset from S3 into a CSV file","slug":"pull-a-dataset-from-s3-into-a-csv-file","depth":2,"children":[]},{"title":"Upload to Openlayer","slug":"upload-to-openlayer","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/openlayer-44/a85e4a0a43b4a6e9/.eslintrc.js"],"subdomain":"openlayer-44","siteName":"Openlayer","title":"Amazon S3 - Openlayer","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T16:26:47.405Z","originalFileLocation":"integrations/aws-s3.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to use datasets stored in Amazon S3 with Openlayer\">\u003cmeta data-mint-head name=\"application-name\" content=\"Openlayer\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Amazon S3 - Openlayer\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to use datasets stored in Amazon S3 with Openlayer\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Openlayer\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.openlayer.com/integrations/aws-s3\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://openlayer-44.mintlify.site/_mintlify/api/og/v2?division=Data+Platforms\u0026amp;title=Amazon+S3\u0026amp;description=Learn+how+to+use+datasets+stored+in+Amazon+S3+with+Openlayer\u0026amp;theme=079d59d752b48a504b621be5\u0026amp;signature=cbe3e791d3c49a79f0b907baaa2d1d1a454904206c05e35bb63a3ac2908e16f4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Amazon S3 - Openlayer\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to use datasets stored in Amazon S3 with Openlayer\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://openlayer-44.mintlify.site/_mintlify/api/og/v2?division=Data+Platforms\u0026amp;title=Amazon+S3\u0026amp;description=Learn+how+to+use+datasets+stored+in+Amazon+S3+with+Openlayer\u0026amp;theme=079d59d752b48a504b621be5\u0026amp;signature=cbe3e791d3c49a79f0b907baaa2d1d1a454904206c05e35bb63a3ac2908e16f4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/openlayer-44/IrRZyBgLHpsjdPBT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Openlayer\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#592FEA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.openlayer.com/integrations/aws-s3\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrations/aws-s3.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.openlayer.com/#organization\",\"name\":\"Openlayer\",\"url\":\"https://docs.openlayer.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/openlayer-44/oDCORJdUN9f9cW5l/logo/logo-docs-brand.svg?fit=max\u0026auto=format\u0026n=oDCORJdUN9f9cW5l\u0026q=85\u0026s=ba6c0b778d2eacb6a216f9fb8caa7132\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.openlayer.com#website\",\"name\":\"Openlayer\",\"url\":\"https://docs.openlayer.com\",\"publisher\":{\"@id\":\"https://docs.openlayer.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.openlayer.com/integrations/aws-s3#webpage\",\"url\":\"https://docs.openlayer.com/integrations/aws-s3\",\"name\":\"Amazon S3\",\"description\":\"Learn how to use datasets stored in Amazon S3 with Openlayer\",\"dateModified\":\"2026-10-23T16:26:47.405Z\",\"isPartOf\":{\"@id\":\"https://docs.openlayer.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.openlayer.com/integrations/aws-s3#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.openlayer.com/integrations/aws-s3#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Data Platforms\",\"item\":\"https://docs.openlayer.com/integrations/amazon-sagemaker\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Amazon S3\",\"item\":\"https://docs.openlayer.com/integrations/aws-s3\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.openlayer.com/integrations/aws-s3#article\",\"headline\":\"Amazon S3\",\"name\":\"Amazon S3\",\"description\":\"Learn how to use datasets stored in Amazon S3 with Openlayer\",\"url\":\"https://docs.openlayer.com/integrations/aws-s3\",\"mainEntityOfPage\":{\"@id\":\"https://docs.openlayer.com/integrations/aws-s3#webpage\"},\"dateModified\":\"2026-10-23T16:26:47.405Z\",\"publisher\":{\"@id\":\"https://docs.openlayer.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.openlayer.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Openlayer\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Openlayer","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"Integrations","groups":[{"group":"Integrations","pages":[{"title":"Overview","href":"/integrations/overview"}]},{"group":"LLM Providers","pages":[{"title":"Amazon Bedrock","href":"/integrations/amazon-bedrock"},{"title":"Anthropic","href":"/integrations/anthropic"},{"title":"Azure Content Understanding","href":"/integrations/azure-content-understanding"},{"title":"Azure AI Speech","href":"/integrations/azure-speech"},{"title":"Google Conversational Search","href":"/integrations/google-conversational-search"},{"title":"Google Gemini","href":"/integrations/google-gemini"},{"title":"Groq","href":"/integrations/groq"},{"title":"Mistral AI","href":"/integrations/mistral-ai"},{"title":"OpenAI \u0026 Azure OpenAI","href":"/integrations/openai"},{"title":"Oracle OCI Generative AI","href":"/integrations/oracle-oci"}]},{"group":"Frameworks","pages":[{"title":"Claude Agent SDK","href":"/integrations/claude-agent-sdk"},{"title":"Google Agent Development Kit (ADK)","href":"/integrations/google-adk"},{"title":"LangChain","href":"/integrations/langchain"},{"title":"LangGraph","href":"/integrations/langgraph"},{"title":"LiteLLM","href":"/integrations/litellm"},{"title":"Portkey","href":"/integrations/portkey"},{"title":"Microsoft Agent Framework","href":"/integrations/microsoft-agent-framework"},{"title":"OpenAI Agents SDK","href":"/integrations/openai-agents-sdk"},{"title":"Pydantic AI","href":"/integrations/pydantic-ai"},{"title":"Semantic Kernel","href":"/integrations/semantic-kernel"},{"title":"Spring AI","href":"/integrations/spring-ai"},{"title":"Strands Agents","href":"/integrations/strands-agents"}]},{"group":"No-Code Platforms","pages":[{"title":"Claude Compliance","href":"/integrations/claude-compliance"},{"title":"CrowdStrike Falcon Guardian","href":"/integrations/crowdstrike-falcon-guardian"},{"title":"Island AI Protect","href":"/integrations/island"},{"title":"Databricks AI/BI Genie","href":"/integrations/databricks-ai-bi-genie"},{"title":"Dialogflow CX","href":"/integrations/dialogflow-cx"},{"title":"ElevenLabs Agents","href":"/integrations/elevenlabs"},{"title":"IBM Watson Orchestrate","href":"/integrations/ibm-watson-orchestrate"},{"title":"Langflow","href":"/integrations/langflow"},{"title":"Microsoft 365 Copilot","href":"/integrations/microsoft-365-copilot"},{"title":"Microsoft Copilot Studio","href":"/integrations/microsoft-copilot-studio"},{"title":"Microsoft Teams bots","href":"/integrations/microsoft-teams-bots"},{"title":"Monday","href":"/integrations/monday"},{"title":"Open WebUI","href":"/integrations/open-webui"},{"title":"OpenAI Compliance","href":"/integrations/openai-compliance"},{"title":"Palantir Foundry","href":"/integrations/palantir-foundry"},{"title":"Parloa","href":"/integrations/parloa"},{"title":"Salesforce Agentforce","href":"/integrations/salesforce-agentforce"},{"title":"Snowflake Cortex","href":"/integrations/snowflake-cortex"}]},{"group":"Observability","pages":[{"title":"A2A Protocol","href":"/integrations/a2a-protocol"},{"title":"Claude Code","href":"/integrations/claude-code"},{"title":"OpenLIT","href":"/integrations/openlit"},{"title":"OpenLLMetry","href":"/integrations/openllmetry"},{"title":"OpenTelemetry","href":"/integrations/opentelemetry"}]},{"group":"Shadow AI Discovery","pages":[{"title":"Shadow AI discovery","icon":"radar","href":"/integrations/shadow-ai-discovery"},{"title":"Cloudflare One","href":"/integrations/cloudflare-one"},{"title":"CrowdStrike Falcon discovery","sidebarTitle":"CrowdStrike Falcon","href":"/integrations/crowdstrike-falcon-discovery"},{"title":"Island Enterprise Browser discovery","sidebarTitle":"Island","href":"/integrations/island-discovery"},{"title":"Netskope","href":"/integrations/netskope"}]},{"group":"Data Platforms","pages":[{"title":"Amazon SageMaker","hidden":false,"description":"Learn how to upload models deployed in Amazon SageMaker to Openlayer","href":"/integrations/amazon-sagemaker"},{"title":"Amazon S3","hidden":false,"href":"/integrations/aws-s3"},{"title":"Google BigQuery","description":"Connect your BigQuery tables to Openlayer for data quality monitoring","href":"/integrations/bigquery"},{"title":"Databricks","href":"/integrations/databricks"},{"title":"Snowflake","href":"/integrations/snowflake"}]},{"group":"Evaluation \u0026 Quality","pages":[{"title":"Great Expectations","href":"/integrations/great-expectations"},{"title":"Ragas","href":"/integrations/ragas"}]},{"group":"Data Labeling","pages":[{"title":"Label Studio","href":"/integrations/label-studio"}]},{"group":"Collaboration","pages":[{"title":"GitHub","href":"/integrations/github"},{"title":"Slack","hidden":false,"href":"/integrations/slack"}]}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Amazon S3 - Openlayer","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-BFbLClTf.js","lightbox-handle-r17bVUz3.js"]}