-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuildspec.yml
22 lines (18 loc) · 1.05 KB
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
commands:
- 'apt-get update -y'
- 'apt-get install -y --no-install-recommends libgeos-dev libproj-dev proj-bin'
- 'pip3 install numpy'
- 'cp -R /usr/lib/x86_64-linux-gnu/libgeos* /usr/lib/x86_64-linux-gnu/libproj* $CODEBUILD_SRC_DIR/lambda/'
- 'cp /usr/bin/proj $CODEBUILD_SRC_DIR/lambda'
build:
commands:
- 'pip3 install -t $CODEBUILD_SRC_DIR/lambda cartopy matplotlib pyproj==1.9.6 pillow scipy'
post_build:
commands:
- 'aws cloudformation package --template-file $CODEBUILD_SRC_DIR/template.yml --s3-bucket $BUILD_BUCKET --output-template-file $CODEBUILD_SRC_DIR/deployment.yml'
- 'aws cloudformation deploy --stack-name $STACK_NAME --template-file $CODEBUILD_SRC_DIR/deployment.yml --s3-bucket $BUILD_BUCKET --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM --parameter-overrides "NdfdElement=$NDFD_ELEMENT" "SquareKm=$SQUARE_KM" "CenterLatitude=$CENTER_LATITUDE" "CenterLongitude=$CENTER_LONGITUDE" "TimeZone=$TIMEZONE"'