Product name
Product description
vc i aws/aws-s3-vectorsCost-optimized vector store
Build at the speed of an idea with AWS. Create AWS resources like a new database, storage bucket, or a search backend in seconds and add features on-demand as your application grows. Focus on coding, not infrastructure management - our serverless, fully managed services automatically scale with your workload and scale to zero when idle, so you only pay for what you use. Whether you're prototyping your next big idea or powering production AI and data-driven applications, AWS deliver the security, reliability, and price performance you need without the operational overhead.
Get started for free with $100 in credits towards any of these AWS products.
Start by connecting to your existing project and then run vercel link in the CLI to link to the project locally. The application, hosted on Vercel, establishes secure AWS connections without hardcoded access credentials by leveraging Vercel's OIDC Federation and Amazon S3 IAM authentication.
Connecting your project links the relevant environment variables. To use these variables in your local development environment, run:
vercel env pull
Install dependencies
npm install @aws-sdk/client-s3vectors @vercel/functions/oidc
Select your preferred product and proceed to install. New to AWS? Create a new AWS account with $100 in credit - no credit card required (under free plan). Your credits remain available even after upgrading to a paid account later.
Under the free plan, new AWS customers get $100 in free credits to explore all eligible AWS services—valid for 6 months, no strings attached. As your needs grow, simply upgrade to a paid plan and scale beyond free tier limits. All billing is handled directly through AWS.
Install Amazon S3 Vectors to your Vercel project.
Create S3 Vector client
import { S3VectorsClient, QueryVectorsCommand } from "@aws-sdk/client-s3vectors";
import { awsCredentialsProvider } from "@vercel/functions/oidc";
const vectors = new S3VectorsClient({
region: process.env.AWS_REGION,
credentials: awsCredentialsProvider({
roleArn: process.env.AWS_ROLE_ARN,
}),
});
export async function POST(request) {
const { embedding } = await request.json();
const result = await vectors.send(new QueryVectorsCommand({
vectorBucketName: process.env.S3_VECTOR_BUCKET_NAME,
indexName: "documents",
queryVector: { float32: embedding },
topK: 5,
returnMetadata: true,
npm run dev
Navigate to https://localhost:3000
Once ready, you can deploy your application to Vercel.