In order to execute maas-backend lambda functions locally with sls invoke local command, you must have appconfig container run locally.
Have Docker installed
Connect to VPN (not mandatory but locally invoked functions will fail due to private connection to Database)
Make sure you have the latest AWS CLI installed that supports: https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html
There is no need to start the container manually as it will be started by appconfig plugin, and closed once sls invoke local finishes
To negate this automatic behavior, do:
maas-development roleaws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 645579357333.dkr.ecr.eu-west-1.amazonaws.comdocker run -it -p 2772:2772 -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN -e AWS_REGION=eu-west-1 -e PORT=2772 645579357333.dkr.ecr.eu-west-1.amazonaws.com/appconfig-cache:1.0.0sls invoke local will work fine.Content type
Image
Digest
Size
107 MB
Last updated
over 5 years ago
docker pull maasglobal/appconfig-cache