Need help in choosing the best AWS storage source for persistent storage for Hashicorp vault hosted on AWS EKS Fargate

I am using the Hashicorp vault on the AWS EKS Fargate to store the data but the issue is every time I stop and restart the pods the data stored inside it are vanished and also the login tokens get changed every time. This may be because there is no persistent storage attached to the Hashicorp vault pod.

Please help me with:

  1. Which AWS Storage solution will be best for me (for production usage) and how can I attach that storage service to the existing AWS EKS Fargate pod so that the stored data on the Hashicorp vault pod is not lost even if the pod is terminated or replaced?
  2. And also how I can make the token for the Hashocorp vault static so that I have the same token every time even if the Hashicorp vault is terminated or replaced.

That is exactly the reason.

  1. Not going to tell you what storage solution is best for you because it depends on your setup but it’s very common to use EFS file systems for that (since you can’t mount EBS volumes to Fargate Pods).

    Also, check out Vault’s guide on Stateful Storage

  2. This happens for the same reason stated above.