Skip to content

Commit ef14e6d

Browse files
committed
feat: initial commit
1 parent 6b47c1a commit ef14e6d

9 files changed

+275
-0
lines changed

.circleci/config.yml

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
version: 2.1
2+
3+
orbs:
4+
aws-cli: circleci/[email protected]
5+
6+
commands:
7+
publish:
8+
steps:
9+
- checkout
10+
- aws-cli/install
11+
- aws-cli/configure
12+
- run: ./publish.sh
13+
14+
jobs:
15+
ap_northeast_1:
16+
executor: aws-cli/default
17+
environment:
18+
TARGET_REGION: ap-northeast-1
19+
steps:
20+
- publish
21+
22+
ap_northeast_2:
23+
executor: aws-cli/default
24+
environment:
25+
TARGET_REGION: ap-northeast-2
26+
steps:
27+
- publish
28+
29+
ap_south_1:
30+
executor: aws-cli/default
31+
environment:
32+
TARGET_REGION: ap-south-1
33+
steps:
34+
- publish
35+
36+
ap_southeast_1:
37+
executor: aws-cli/default
38+
environment:
39+
TARGET_REGION: ap-southeast-1
40+
steps:
41+
- publish
42+
43+
ap_southeast_2:
44+
executor: aws-cli/default
45+
environment:
46+
TARGET_REGION: ap-southeast-2
47+
steps:
48+
- publish
49+
50+
ca_central_1:
51+
executor: aws-cli/default
52+
environment:
53+
TARGET_REGION: ca-central-1
54+
steps:
55+
- publish
56+
57+
eu_north_1:
58+
executor: aws-cli/default
59+
environment:
60+
TARGET_REGION: eu-north-1
61+
steps:
62+
- publish
63+
64+
eu_central_1:
65+
executor: aws-cli/default
66+
environment:
67+
TARGET_REGION: eu-central-1
68+
steps:
69+
- publish
70+
71+
eu_west_1:
72+
executor: aws-cli/default
73+
environment:
74+
TARGET_REGION: eu-west-1
75+
steps:
76+
- publish
77+
78+
eu_west_2:
79+
executor: aws-cli/default
80+
environment:
81+
TARGET_REGION: eu-west-2
82+
steps:
83+
- publish
84+
85+
eu_west_3:
86+
executor: aws-cli/default
87+
environment:
88+
TARGET_REGION: eu-west-3
89+
steps:
90+
- publish
91+
92+
sa_east_1:
93+
executor: aws-cli/default
94+
environment:
95+
TARGET_REGION: sa-east-1
96+
steps:
97+
- publish
98+
99+
us_east_1:
100+
executor: aws-cli/default
101+
environment:
102+
TARGET_REGION: us-east-1
103+
steps:
104+
- publish
105+
106+
us_east_2:
107+
executor: aws-cli/default
108+
environment:
109+
TARGET_REGION: us-east-2
110+
steps:
111+
- publish
112+
113+
us_west_1:
114+
executor: aws-cli/default
115+
environment:
116+
TARGET_REGION: us-west-1
117+
steps:
118+
- publish
119+
120+
us_west_2:
121+
executor: aws-cli/default
122+
environment:
123+
TARGET_REGION: us-west-2
124+
steps:
125+
- publish
126+
127+
workflows:
128+
version: 2
129+
publish:
130+
jobs:
131+
- ap_northeast_1:
132+
context: ghostscript-lambda-layer
133+
134+
- ap_northeast_2:
135+
context: ghostscript-lambda-layer
136+
137+
- ap_south_1:
138+
context: ghostscript-lambda-layer
139+
140+
- ap_southeast_1:
141+
context: ghostscript-lambda-layer
142+
143+
- ap_southeast_2:
144+
context: ghostscript-lambda-layer
145+
146+
- ca_central_1:
147+
context: ghostscript-lambda-layer
148+
149+
- eu_north_1:
150+
context: ghostscript-lambda-layer
151+
152+
- eu_central_1:
153+
context: ghostscript-lambda-layer
154+
155+
- eu_west_1:
156+
context: ghostscript-lambda-layer
157+
158+
- eu_west_2:
159+
context: ghostscript-lambda-layer
160+
161+
- eu_west_3:
162+
context: ghostscript-lambda-layer
163+
164+
- sa_east_1:
165+
context: ghostscript-lambda-layer
166+
167+
- us_east_1:
168+
context: ghostscript-lambda-layer
169+
170+
- us_east_2:
171+
context: ghostscript-lambda-layer
172+
173+
- us_west_1:
174+
context: ghostscript-lambda-layer
175+
176+
- us_west_2:
177+
context: ghostscript-lambda-layer

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto
2+
*.js text eol=lf
3+
*.zip filter=lfs diff=lfs merge=lfs -text

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.idea/
2+
coverage/
3+
node_modules/
4+
temp
5+
yarn.lock
6+
*.log
7+
.DS_Store
8+
lib/
9+
layer/

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,45 @@
22
> Ghostscript AWS Lambda layer
33
44
[sina-masnadi/lambda-ghostscript](https://github.com/sina-masnadi/lambda-ghostscript) published as a Lambda layer
5+
6+
## Getting Started
7+
8+
Click on Layers and choose "Add a layer", and "Provide a layer version
9+
ARN" and enter the following ARN.
10+
11+
```
12+
arn:aws:lambda:us-east-1:764866452798:layer:ghostscript-lambda-layer:1
13+
```
14+
15+
Current version of Ghostscript is `9.20`
16+
17+
## Available regions
18+
19+
* ap-northeast-1
20+
* ap-northeast-2
21+
* ap-south-1
22+
* ap-southeast-1
23+
* ap-southeast-2
24+
* ca-central-1
25+
* eu-north-1
26+
* eu-central-1
27+
* eu-west-1
28+
* eu-west-2
29+
* eu-west-3
30+
* sa-east-1
31+
* us-east-1
32+
* us-east-2
33+
* us-west-1
34+
* us-west-2
35+
36+
## Update
37+
38+
1. Clone https://github.com/sina-masnadi/lambda-ghostscript repository
39+
2. Create zip archive of Ghostscript binaries with the filename `ghostscript.zip`
40+
3. Put zip archive into this repo
41+
3. Put proper version inside of `publish.sh`
42+
4. Commit & Create Pull Request
43+
44+
## License
45+
46+
MIT © [Shelf](https://shelf.io)

ghostscript.zip

18.6 MB
Binary file not shown.

license

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) Gemshelf Inc. (shelf.io)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

publish.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
GHOSTSCRIPT_VERSION=9.20
4+
LAYER_NAME='ghostscript-lambda-layer'
5+
6+
LAYER_VERSION=$(
7+
aws lambda publish-layer-version --region "$TARGET_REGION" \
8+
--layer-name $LAYER_NAME \
9+
--zip-file fileb://ghostscript.zip \
10+
--description "Ghostscript v${GHOSTSCRIPT_VERSION}" \
11+
--query Version \
12+
--output text
13+
)
14+
15+
aws lambda add-layer-version-permission \
16+
--region "$TARGET_REGION" \
17+
--layer-name $LAYER_NAME \
18+
--statement-id sid1 \
19+
--action lambda:GetLayerVersion \
20+
--principal '*' \
21+
--query Statement \
22+
--output text \
23+
--version-number "$LAYER_VERSION"

renovate.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["github>shelfio/renovate-config"]
3+
}

0 commit comments

Comments
 (0)