-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlambda_local_template.txt
41 lines (35 loc) · 1.73 KB
/
lambda_local_template.txt
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
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
pip install -r ./requirements.txt --quiet
# In order to run you must set the following Environment variables below.
# Environment variable details can be found here:
# https://github.com/vt-digital-libraries-platform/S3toDDB
# You must also customize the argument to the python call in the last line
# to point to your metadata file (csv format)
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#
# NOTE: RUNNING THIS SCRIPT LOCALLY WILL ACTUALLY MODIFY THE DYNAMODB TABLES THAT
# YOU SPECIFY IN THE ENVIRONMENT VARIABLES BELOW. PLEASE MAKE SURE YOU ARE USING
# TABLES ATTACHED TO A DEVELOPMENT/TESTING AMPLIFY BACKEND
# ...OR YOU REALLY KNOW WHAT YOU'RE DOING
#
# EXAMPLE METADATA FILES FROM OUR COLLECTIONS CAN BE FOUND IN THE './metadata_files' DIRECTORY
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
AWS_DEST_BUCKET="<AWS bucket where results will be written>" \
COLLECTION_CATEGORY="<Your collection_category>" \
COLLECTION_IDENTIFIER="<identifier of collection being ingested>" \
COLLECTION_SUBDIRECTORY="<optional subdirectory, after COLLECTION_IDENTIFIER in s3 path>" \
ITEM_SUBDIRECTORY="<optional subdirectory, after archive identifier in s3 path>" \
REGION="<Your AWS region>" \
DYNAMODB_TABLE_SUFFIX="<Dynamo tables env id>" \
DYNAMODB_NOID_TABLE="< Dynamo NOID table name >" \
APP_IMG_ROOT_PATH="<Base path for site assets>" \
NOID_SCHEME="ark:/" \
NOID_NAA="53696" \
LONG_URL_PATH="<Base url for your site>" \
SHORT_URL_PATH="<NOID resolver url>" \
MEDIA_INGEST="<Boolean>" \
MEDIA_TYPE="<Your Media Type>" \
METADATA_INGEST="<Boolean>" \
GENERATE_THUMBNAILS="<Boolean>" \
DRY_RUN="<Boolean, doesn't write to db if true>" \
python3 lambda_function.py "path/to/your/metadata.csv"