Search code examples
amazon-web-servicessecurityapi-keyaws-secrets-managersecret-key

How to reuse API Credentials from AWS secret manager


My question is related to runtime, for example:

  1. I Make all the configurations and store an API Key at AWS Manager
  2. An application retrieves the key and accesses the 3rd API with it
  3. The application keeps running processing other stuff
  4. The application has to access the same 3rd API again

Does it make sense if I save the key in an encrypted file after step 2 and load it in step 4 or should I retrieve the Key at AWS Secret Manager twice and pay for the request multiple times?


Solution

  • You might want to look into client side caching libraries provided by AWS Secrets Manager https://aws.amazon.com/about-aws/whats-new/2019/05/Secrets-Manager-Client-Side-Caching-Libraries-in-Python-NET-Go/