Managers need to verify hours against the roster before they can approve timecards. This program creates an email summary of the last roster period (2 weeks) to assist in this process.
- An AWS account with AWS Lambda access
- Install .NET Core (https://www.microsoft.com/net/core)
- Install NodeJS (https://nodejs.org/en/download/)
- Install Serverless Framework (https://serverless.com/framework/docs/getting-started/)
- Set up AWS credentials
serverless config credentials -p aws --key $YOURKEY --secret $YOURSECRET
./scripts/build.sh
powershell .\scripts\build.ps1
Valid stages are: dev / test / production
serverless deploy --stage production -s $STAGE
serverless deploy function -f summary -s $STAGE
serverless remove
serverless invoke -f summary -s $STAGE -l
serverless logs -f summary -s $STAGE -t
powershell .\scripts\build.ps1 && serverless deploy -s dev && serverless invoke -f summary
serverless logs -f summary -t
The translation depends on a file called people.db in the extra folder. It is a sqlite database of the form
CREATE TABLE "Employees" ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `email` TEXT NOT NULL UNIQUE )
Insert people into the database with
INSERT INTO Employees ('name', 'email') VALUES ('YOUR_NAME', 'YOUR_EMAIL')
- Serverless (https://github.com/serverless/serverless/)
- Google API Dotnet Client (https://github.com/google/google-api-dotnet-client)
- AWS Lambda Dotnet (https://github.com/aws/aws-lambda-dotnet)