2020-06-06 01:04:40 +02:00
|
|
|
# once: a one-time file sharing personal service
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-06 01:04:40 +02:00
|
|
|
It happens that I want to share a file with someone which is sensitive enough
|
|
|
|
|
that I don't want to upload on a public free service.
|
|
|
|
|
|
|
|
|
|
I would like to have something like transfer.sh, running
|
|
|
|
|
as a personal service, with the following features:
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-06 01:04:40 +02:00
|
|
|
- it must be serverless (I'm not willing to pay except for the actual file storage, and only for the time strictly required)
|
|
|
|
|
- it must return a link that I can share to anyone
|
|
|
|
|
- file must be deleted as soon as it get *successfully downloaded*
|
|
|
|
|
- it must expose a simple HTTP API, so *curl* should suffice to share a file
|
|
|
|
|
- it must be protected with some form of authentication
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-06 01:04:40 +02:00
|
|
|
With CDK I could create the following resources:
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-06 01:04:40 +02:00
|
|
|
- An S3 bucket to host the uploaded files
|
|
|
|
|
- A Lambda function to implement the 'get-upload-ticket'
|
|
|
|
|
- A Dynamodb table to store the information about the entries
|
|
|
|
|
- Another Lambda function to implement a "smart" download handler, to delete the file after the very first successful transfer.
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-06 01:04:40 +02:00
|
|
|
I will use API Gateway to expose the lambda functions as an HTTP API.
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-06 01:04:40 +02:00
|
|
|
HERE BE DIAGRAM!
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-08 20:14:56 +02:00
|
|
|
## TODO
|
|
|
|
|
|
|
|
|
|
[+] Publish it to a custom domain name: DONE
|
|
|
|
|
[+] Set logs retention policy
|
|
|
|
|
[+] Deploy custom domain as a nested stack
|
|
|
|
|
[+] Mask link preview depending on the user agent
|
2020-06-08 23:33:18 +02:00
|
|
|
[+] Add a robust authentication method
|
2020-06-08 20:14:56 +02:00
|
|
|
|
|
|
|
|
- Add progressbar to client
|
|
|
|
|
- Package application as a click app
|
|
|
|
|
|
|
|
|
|
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-08 20:14:56 +02:00
|
|
|
- Write a proper README with instructions
|
|
|
|
|
- Record a demo
|
|
|
|
|
- write tests with pytest
|
2020-06-05 18:00:53 +02:00
|
|
|
|
2020-06-08 20:14:56 +02:00
|
|
|
- publish the source code
|
|
|
|
|
- write a blog post
|
|
|
|
|
- add a link to the blog post in the README
|