Receives mails with attached csv files via SES.
- extract attached csv file
- transform format
- sort & filter
- aggregation (multiple entries per day => one day)
- send result via email
"project-name","start","end","duration"
"Project1","01.11.2017 09:45","01.11.2017 10:47","1:07"
Yes, you need it. Get it here
-
Go to AWS SES Domains settings and verify your domain. (it is also possible to use subdomains here) This is will be the domain for receiving mails.
aws-postbox@my.domain.tld
For this you need to follow the steps and fiddle a bit in your domain settings (Route53 or your domain hoster of choice) And wait for the changes to be distributed... -
Go to "Email Addresses" and verify the email address to which the result will be send.
my-normal-email@example.org
You will get a verification mail with a verification link. You know how this works... -
Create an S3 Bucket for the CloudFormation deployment. The Bucket for incomming mails will be created later.
Have your local aws credentials set up.
git clone git@github.com:mnwk/aws-ready-hourstracker-aggregator.git
- Go to the
deploy
folder and copy/rename the two.template
filescd deploy cp config.sh.template config.sh cp timesheets.cfn.yaml.template timesheets.cfn.yaml
- Edit the new files to your needs. Only edit the Parameter section in the CloudFormation file.
- ProjectNameFilter depends on your time tracking app and settings (see "Supported cvs format")
- TracingSwitch enables/disables x-ray tracing (default off)
Hit yarn deploy
and cross fingers.
Go to "Email Receiving"->"Rule Sets" and select "StoreToS3AndTriggerLambda". Klick on "Set as Acive Rule Set"
You may now send a mail with the attached timetracking csv from you app to your aws-postbox email address. After some seconds you should receive a new email in you result postbox.
- Have a look at Cloudwatch->Logs and search for
/aws/lambda/HandleTimesheetsFunction
- enable Tracing (TracingSwitch), redeploy and check X-Ray
- Deleting Stack: make sure to disable "StoreToS3AndTriggerLambda" RuleSet in SES before deleting