Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.43 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.43 KB

invalidate-redis

AWS Lambda function allowing removal of keys from Redis
Built with ❤︎ by Stockport Council and contributors

Table of Contents

Features

  • Easy invalidation: simple way to remove a value from Redis using the key

Prerequisites

A REDIS_URL environment variable has to be set, providing the url to your Redis store. The default Redis port (6379) is used.

Philosophy

We needed a simple, standalone solution to invalidate our Redis cache distributions.

Usage

Built to be used with AWS Lambda and API Gateway.

To manually send a request to trigger a invalidate request you need to supply a 'Header' value of key 'x-api-key' with the API Gateway key associated with the Enviroment you are targeting.

The API Gateway url is found at: APIs > invalidateRedis > Stages (The url will end with default/invalidaRedis{ENV})

The API Gateway API key is found at within AWS gateway.

Possible responses:

  • 200 OK: Successfuly deleted the key. Also returned when the key does not exist in the store.
  • 500 Internal Server Error: Error while carrying out the operation. Contains error property.

License

MIT