GitHub Repository
You can find the project source code on GitHub.
Prerequisites
Project Setup
Create a SAM application with the following options:Counter Function Setup
Update/hello_world/requirements.txt
to include upstash-redis
:
/hello_world/requirements.txt
/hello_world/app.py
:
/hello_world/app.py
/template.yaml
to pass Upstash Redis environment variables:
/template.yaml
Database Setup
Create a Redis database using Upstash Console or Upstash CLI. CopyUPSTASH_REDIS_REST_URL
and UPSTASH_REDIS_REST_TOKEN
for the next steps.