KeyError while using Secrets

@here I added key-value in secrets settings.

I’m trying to retrieve it

from corva import Api, Cache, Logger, StreamTimeEvent, stream, secrets

@stream
def lambda_handler(corva_event: StreamTimeEvent, api: Api, cache: Cache):

    api_key = secrets['APIKEY']

and getting KeyError

image

1 Like

Hi @Yuliya . Thank you for the question. We are still working on a solution. Here is some feedback from our developers.

  1. (Cause of KeyError) - Secrets update might take a few minutes to propagate to AWS lambda
  2. (Cause of wrong value) - python-sdk caches secrets for 5 minutes, thats why you see old value
1 Like