- Introduce a caching layer.
- Do a query to call a Lambda. That lambda calls another lambda in async mode and the 1st lambda responds a req id to caller
- The 2nd lambda queries ddb and waits for result. On result received from ddb write results to a cache like Elasticache
- From frontend keep querying cache with request id. WHen result gets available, read the results. This will be much faster than ddb
- Use websocket
- Implement a websocket service
- Open a websocket connection from frontend
- repeat above steps with 2 lambda (from caching option)
- but instead of cache, 2nd lambda returns results to websocket and frontend gets result from socket connection
- Use DAX to improve performance. This will improve DDB performance if you have large number of records
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yaml, subprocess, json, re, sys | |
FILE_NAME = 'auth_config.yaml' | |
KUBERNETES_GROUP = 'system:masters' | |
cmd = f'kubectl get configmap aws-auth -n kube-system -o yaml > {FILE_NAME}' | |
MASTER_PARSER = '({["rolearn":"arn]+[:a-z0-9\/\w-]+"[,"\w\/-:{{{]*[-\w}}",:\[]*[\]]*})' #regex101 |