0

I'm building an HTTP API with API gateway and want to use API keys for authentication. Since they aren't supported by HTTP APIs, I plan on verifying them manually in a Lambda function.

Where would the best way to store these keys be? I'd rather not spin up a db just for this. I thought about just using parameter store because they will (for the moment) only be used internally and we need to store just a few. Is there a better way to do this? Maybe even something that can generate and rotate these keys automatically?

3
  • aws.amazon.com/kms or aws.amazon.com/secrets-manager
    – ceejayoz
    Commented Nov 21, 2022 at 1:18
  • thanks, I thought both where more for storing 3rd party keys
    – Max
    Commented Nov 21, 2022 at 20:35
  • How trivial is your scenario? Because if you worry about expiration and limits and other stuff, a DB IS the simplest solution as it allows to have all the metadata in one place. Like "generate and rotate".
    – TomTom
    Commented Apr 9 at 12:32

1 Answer 1

0

AWS Secrets Manager : Use AWS Secrets Manager for storing your API keys. It offers the best security practices and future-proofs your solution for scaling or adding automatic rotation later.

Parameter Store : If Parameter Store is your only option for now due to a limited number of keys, implement the best practices mentioned above to minimize risk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .