-
Notifications
You must be signed in to change notification settings - Fork 9
/
publish.sh
executable file
·31 lines (28 loc) · 716 Bytes
/
publish.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
FFPMEG_VERSION=4.1.3
LAYER_NAME='ffmpeg'
REGIONS='
ap-northeast-1
ap-northeast-2
ap-south-1
ap-southeast-1
ap-southeast-2
ca-central-1
eu-north-1
eu-central-1
eu-west-1
eu-west-2
eu-west-3
sa-east-1
us-east-1
us-east-2
us-west-1
us-west-2
'
PROFILE='dev'
for region in $REGIONS; do
aws lambda add-layer-version-permission --region $region --layer-name $LAYER_NAME \
--statement-id sid1 --action lambda:GetLayerVersion --principal '*' \
--version-number $(aws lambda publish-layer-version --region $region --layer-name $LAYER_NAME --zip-file fileb://layer.zip \
--description "FFMPEG ${FFPMEG_VERSION} binaries" --query Version --output text --profile $PROFILE) --profile $PROFILE
done