Skip to content

Commit

Permalink
Merge branch 'develop' into gtc-2868
Browse files Browse the repository at this point in the history
  • Loading branch information
danscales authored Jun 26, 2024
2 parents 7e64844 + c9bcbf5 commit b0b229f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions batch/python/export_to_gee.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python

import json
import os

Expand All @@ -9,12 +11,13 @@

EE_PROJECT = "forma-250"
GCS_BUCKET = "data-api-gee-assets"
GCS_SECRET_KEY_ARN = os.environ["GCS_SECRET_KEY_ARN"]
GCS_SECRET_KEY_ARN = os.environ["AWS_GCS_KEY_SECRET_ARN"]
GCS_CREDENTIALS_FILE = "gcs_credentials.json"
AWS_REGION = os.environ["AWS_REGION"]


def set_google_application_credentials():
client = boto3.client("secretsmanager")
client = boto3.client("secretsmanager", region_name=AWS_REGION)
response = client.get_secret_value(SecretId=GCS_SECRET_KEY_ARN)

with open(GCS_CREDENTIALS_FILE, "w") as f:
Expand Down
2 changes: 1 addition & 1 deletion batch/scripts/cogify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fi
aws s3 cp cog.tif "${TARGET}"

if [ -n "$EXPORT_TO_GEE" ]; then
python export_to_gee.py --dataset "${DATASET}" --implementation "${IMPLEMENTATION}"
export_to_gee.py --dataset "${DATASET}" --implementation "${IMPLEMENTATION}"
fi

set +x
Expand Down

0 comments on commit b0b229f

Please sign in to comment.