This project uses serverless to build and delpoy a lambda function.
In order to deploy and run this project you must have the following:
- Node.JS v22.x
- An active AWS account
- A IAM User with the rights to deploy infrastructure and run lambdas
- A pair of
Access Key ID
andSecret Access Key
issued for that user - AWS CLI installed
- AWS SAM CLI installed
Install the project dependencies using
npm i
Setup your AWS credentials using this script and fill the values when asked
aws configure
If you prefer another way refer to the docs.
- Create a free serverless account and issue a new license key
- Or use this one
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmdJZCI6IjVkNzVkYTBiLWM5ZjctNDEzMy05OTkzLTcyZGMxOWUwZGNlMSIsImlhdCI6MTc1NDMxNjExMywiZXhwIjoxNzg1ODUyMTEzLCJpc3MiOiJhcHAuc2VydmVybGVzcy5jb20ifQ.QPcOWlmHgYGQeVxagqZ6CC4sIpKOJB3Ku3HgpTYCzAJySp6LOhudoHzkQDjkeZtFNrff8LdlyTQKxqJjjlhTc92AL8H7niinH-fZ7bUBxjxIoQ9tfo8WPrIGgQnp-y_k12LpXqQV0247aZZynyt0gvdPp-zPaGAMqsyq0jVljlvS_45yIYYmIMf4bHklH-XtNMQw5ZldttVzbFOISX7xI1epW0rmO1ea06ZPD8ptlqv4Z04bOYW3ka0X_3UKGyNIK_gvHjoB0rFgooivlArJMklQOovAgMUODR4b-2FFjtELhhb-rXu27bXASk8hukkIkil_gOBalx1_y9DsPcNS1w
- Run the login command using the licence key
npm run login
In order to deploy the example, you need to run the following command:
npm run deploy
After successful deployment, you can invoke the deployed function by uploading the publickey.cer
file located in the tools folder in this project to the dormakaba-certificates-bucket
S3 bucket. That should automatically trigger the lambda execution.
To run locally you still need the publickey.cer
uploaded to the S3 bucket.
Trigger the function locally using
npm run invoke:local
To run the tests use npm test