Published Aug 2023

AWS Storage Blog: Architecting high performance AI-driven data applications with Spice AI and AWS
spice add spiceai/aws-s3-tutorialspice connect spiceai/aws-s3-tutorialdependencies:
- spiceai/aws-s3-tutorialversion: v1
kind: Spicepod
name: spice-on-aws
datasets:
- from: postgres:postgres.public.questions
name: questions_aurora
params:
pg_host: ${env:POSTGRES_HOST}
pg_db: postgres
pg_port: 5432
pg_user: ${env:POSTGRES_USERNAME}
pg_pass: ${env:POSTGRES_PASSWORD}
pg_sslmode: require
acceleration:
enabled: true
engine: duckdb
mode: file
refresh_mode: full
refresh_check_interval: 1h
columns:
- name: title
full_text_search:
enabled: true
row_id:
- question_id
- from: glue:spiceai_aws_ns.questions
name: questions
params:
glue_region: us-east-1
glue_catalog_id: 211125479522:s3tablescatalog/spiceai-questions
glue_key: ${env:AWS_ACCESS_KEY_ID}
glue_secret: ${env:AWS_SECRET_ACCESS_KEY}
acceleration:
enabled: true
engine: duckdb
mode: file
vectors:
enabled: true
engine: s3_vectors
params:
s3_vectors_aws_region: us-east-1
s3_vectors_bucket: spiceai-questions-vector-bucket
s3_vectors_index: spiceai-questions-vector-index
s3_vectors_aws_access_key_id: ${env:AWS_ACCESS_KEY_ID}
s3_vectors_aws_secret_access_key: ${env:AWS_SECRET_ACCESS_KEY}
columns:
- name: body
full_text_search:
enabled: true
row_id:
- question_id
embeddings:
- from: bedrock_nova
row_id:
- question_id
embeddings:
- from: bedrock:amazon.nova-2-multimodal-embeddings-v1:0
name: bedrock_nova
params:
aws_region: us-east-1
dimensions: "1024"
aws_access_key_id: ${env:AWS_ACCESS_KEY_ID}
aws_secret_access_key: ${env:AWS_SECRET_ACCESS_KEY}
models:
- from: bedrock:us.amazon.nova-2-lite-v1:0
name: aws_nova
params:
aws_region: us-east-1
aws_access_key_id: ${env:AWS_ACCESS_KEY_ID}
aws_secret_access_key: ${env:AWS_SECRET_ACCESS_KEY}
An implementation of Architecting high-performance AI-driven data applications with Spice AI and AWS running on Spice Cloud, instead of an EC2 instance.
SELECT title, tags, type FROM questions WHERE body ILIKE '%Java%' LIMIT 5;
SELECT title, creation_date, score FROM vector_search (questions,'Java issues',5) ORDER BY score DESC;
SELECT title, creation_date, score FROM vector_search (questions,'JVM issues',5) ORDER BY score DESC;
-- Expected zero results.
SELECT title, tags, type FROM questions WHERE body ILIKE '%JVM Issues%' LIMIT 5;
select question_id, fused_score, title, tags
from rrf(
text_search(questions, 'Java'),
vector_search(questions, 'Java issues')) order by fused_score desc
limit 5
Published Aug 2023
Published Apr 2024
Published Sep 2024
Published Sep 2024