You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deb/README.md
+81-24Lines changed: 81 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,38 +1,48 @@
1
-
2
1
# AWS Lambda APT repository manager for S3
3
2
4
3
Rewrite of [szinck/s3apt](https://github.com/szinck/s3apt) with a few changes and extra features - Release file is being generated and is signed with GPG key provided
5
4
6
-
## Setting up S3 and Lambda
5
+
## Readme contents
6
+
7
+
*[Setting up code, S3 and Lambda](#setting-up-code-s3-and-lambda)
If CLI is not your thing, then you can upload code manaully
100
+
101
+
Create new lambda function, set handler to **s3apt.lambda_handler**, runtime to **python 2.7**
102
+
103
+
Upload `code.zip` to lambda function
104
+
105
+
### The triggers
106
+
107
+
* Object Created(All), suffix 'deb'
108
+
* Object Removed(All), suffix 'deb'
109
+
* If you are using certain directory as a repo, set it as prefix
110
+
111
+
### Set up S3
54
112
Make folder in your S3 bucket with the same name as CACHE_PREFIX variable
55
113
56
114
Upload secret key file to location you specified as GPG_KEY
57
115
116
+
58
117
Upload .deb file to desired folder, lambda function should now keep your repository up to date
59
118
60
119
## Setting up apt
@@ -77,8 +136,6 @@ sudo apt upgrade
77
136
78
137
## Notes
79
138
80
-
.deb, Release and Package files are and should be publicly accessible for previously mentioned method of setting up apt's sources list to work, if you don't want them to be, then change PUBLIC in environment variables to False and refer to szinck's guide [here](http://webscale.plumbing/managing-apt-repos-in-s3-using-lambda)
81
-
82
-
If somebody tries to inject a malicious deb file in your repo it will be automaticly added to repository. It is your job to make bucket secure enough for this not to happen.!!!
83
-
84
-
**You should change lambda timeout to 10 seconds or more to make sure that function will work**
139
+
* .deb, Release and Package files are and should be publicly accessible for previously mentioned method of setting up apt's sources list to work, if you don't want them to be, then change PUBLIC in environment variables to False and refer to szinck's guide [here](http://webscale.plumbing/managing-apt-repos-in-s3-using-lambda)
140
+
* If somebody tries to inject a malicious deb file in your repo it will be automaticly added to repository. It is your job to make bucket secure enough for this not to happen.!!!
141
+
***You should change lambda timeout to more than 10 seconds to make sure that function will work**
0 commit comments