Skip to content
Back

How much should I wait for Appwrite Functions updated?

  • 0
  • Functions
  • Cloud
Venom
17 Jul, 2025, 08:31

Here's my situation:

  1. Deploy the function first
  2. Add API key(other service) in env
  3. Redeploy
  4. The function still cannot recognize my API key.

I think it might using my first deployment even though I redeploy. How much I wait for? Or is it a bug?

TL;DR
Developers are experiencing issues with Appwrite Functions not recognizing new environment variables after redeployment. One solution is to check all environment variables using `os.Environ()` in the code. In some cases, creating a new function from scratch resolves the problem. Additionally, there may be a caching issue with CDN. If the environment variables are not updated after redeployment, it could indicate the function is still using the initial deployment. Consider waiting for some time or report it as a possible bug.
Chirag Aggarwal
17 Jul, 2025, 08:47

if you update an environment variable, on going to your Function > Deployments screen you should see this modal

Chirag Aggarwal
17 Jul, 2025, 08:47

if its not there, it means that the function is using the latest values

Venom
17 Jul, 2025, 08:48

But, it doesn't recognize my new env key

Venom
17 Jul, 2025, 08:48

I've already checked that modal and redeployed

Chirag Aggarwal
17 Jul, 2025, 08:49

can you share the code? and the values?

many things can be wrong like difference in casing, typo etc.

Venom
17 Jul, 2025, 08:49
Venom
17 Jul, 2025, 08:49
Venom
17 Jul, 2025, 08:49
Venom
17 Jul, 2025, 08:50
Venom
17 Jul, 2025, 08:52

When I create a new function freshly, then it works.

Venom
17 Jul, 2025, 08:52

I think it rather be a CDN caching problem or so what

Chirag Aggarwal
17 Jul, 2025, 08:52

can you try using

TypeScript
// os.Environ() returns a slice of strings in the format "key=value"
envVars := os.Environ()

to see all the env values being set in the environment

Venom
17 Jul, 2025, 09:00
Venom
17 Jul, 2025, 09:00
Venom
17 Jul, 2025, 09:01

@Chirag Aggarwal Even though I redeployed, actually it might be using old one

Chirag Aggarwal
17 Jul, 2025, 09:02

strange.. yeah

cc @Meldiron

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more