This project demonstrates how to manage access to ElastiCache Redis by storing Redis RBAC username and passwords in AWS Secrets Manager. Granting or denying access to the secret will by proxy grant or deny access to Redis via RBAC.
This project creates an ElastiCache Redis Replication group, IAM roles, Lambdas, Secrets and ElastiCache RBAC users and user groups.
Details on the architecture can be found here
This project uses the AWS Cloud Development Kit (CDK). You can find instructions on installing CDK here
- Run
npm install
to install the node dependencies for the project - You may need to run
cdk bootstrap aws://<account_id>/<region>
to initialize the region to use CDK - Build the zip files which contain lambda functions by calling
npm run-script zip
- Deploy the project by calling
cdk deploy
npm run-script zip
bundle lambda functions into zip filesnpm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
This library is licensed under the MIT-0 License. See the LICENSE file.