#community-help

Issues Running Typesense on AWS Fargate

TLDR Sulove is struggling with administrative operations on Typesense on AWS Fargate, and getting errors. Kishore Nallan suggested checking if data wasn't persisting on Fargate, despite no resolution being achieved.

Powered by Struct AI
Sep 09, 2023 (2 weeks ago)
Sulove
Photo of md5-54f045fadc868912ffcd8bfcfccbccc9
Sulove
05:45 AM
Hi everyone,

I'm having some trouble running Typesense on AWS Fargate. I've set it up following the documentation, but when I try to perform administrative operations, I get an error stating Scoped API keys can only be used for searches.

I've double-checked and am using the master API key in my task definition. Here is a snippet from my Fargate task definition for reference:

json
"environment": [
  {
    "name": "API_KEY",
    "value": "my-master-api-key-here"
  }
],
"command": [
  "--data-dir",
  "/data",
  "--api-key",
  "${API_KEY}",
  "--enable-cors"
],
    "runtimePlatform": {
        "cpuArchitecture": "X86_64",
        "operatingSystemFamily": "LINUX"
    }

The documentation mentions:
Let's begin by creating an API key that allows you to do all operations, i.e. it's effectively an admin key and is equivalent to the key that you start Typesense with (via --api-key).```
and that is what I did however, I am getting the scope for search-only error when I try to create collection. Can anyone provide some insights on what might be going wrong?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:57 AM
Have you tried creating a collection using curl so that you can eliminate any code configuration issues?
Sulove
Photo of md5-54f045fadc868912ffcd8bfcfccbccc9
Sulove
01:32 PM
Yup I did use both the curl and the requests but I get the limited scope.
Sep 10, 2023 (2 weeks ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:37 PM
Perhaps the data is not being persisted on Fargate. You need a persisted volume.