Skip to content

Commit

Permalink
Fold in RDS and Lambda Changes from 1.2.1 Release Two Weeks Ago (#33)
Browse files Browse the repository at this point in the history
* .gitignore

* fold in RDS and lambda changes

---------

Co-authored-by: ranchodeluxe <greg.corradini@gmail.com>
  • Loading branch information
ranchodeluxe and ranchodeluxe authored Aug 26, 2024
1 parent 857a3e0 commit e5b650c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import base64
import ast
import json
#mwaa_env_name = 'veda-pipeline-dev-mwaa'
mwaa_env_name = 'veda-pipeline-staging-mwaa'
dag_name = 'veda_discover'
mwaa_cli_command = 'dags trigger'
Expand All @@ -20,25 +21,10 @@ def lambda_handler(event, context):
s3_filename_no_ext = os.path.splitext(s3_filename_target)[0]
print(f"[ S3 FILENAME NO EXT ]: {s3_filename_no_ext}")

if s3_filename_target.endswith(".gpkg"):
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}

if s3_event_key.startswith("EIS/FEDSoutput-v3"):
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}

bucket_key_prefix = "EIS/FEDSoutput/Snapshot/"
if s3_event_key.startswith("EIS/FEDSoutput-v3"):
bucket_key_prefix = "EIS/FEDSoutput-v3/Snapshot/"
if s3_filename_no_ext.startswith("lf_"):
bucket_key_prefix = "EIS/FEDSoutput/LFArchive/"


# get web token
mwaa_cli_token = client.create_cli_token(
Name=mwaa_env_name
Expand Down
1 change: 1 addition & 0 deletions terraform/veda-wfs3/rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ resource "aws_db_instance" "db" {
db_subnet_group_name = aws_db_subnet_group.db.name
vpc_security_group_ids = module.networking.security_groups_ids
skip_final_snapshot = true
ca_cert_identifier = "rds-ca-rsa4096-g1"
apply_immediately = true
backup_retention_period = 7
username = "postgres"
Expand Down

0 comments on commit e5b650c

Please sign in to comment.