Skip to content

Commit

Permalink
Merge pull request #102 from cykhoo0108/lambda-runtime-path
Browse files Browse the repository at this point in the history
Change constant to dynamically get python version for botocore dir path
  • Loading branch information
cykhoo0108 authored May 16, 2024
2 parents 0c0772c + bf5e944 commit 9a9f90d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion constants.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import pathlib
import sys

ROOT_DIR = str(pathlib.Path.cwd())

SERVICE_DIR = ROOT_DIR + '/services'
TEMPLATE_DIR = ROOT_DIR + '/templates'
# VENDOR_DIR = ROOT_DIR + '/vendor'
FRAMEWORK_DIR = ROOT_DIR + '/frameworks'
BOTOCORE_DIR = ROOT_DIR + '/../lib64/python3.7/site-packages/botocore'
BOTOCORE_DIR = ROOT_DIR + '/../lib64/python'+ str(sys.version_info.major) + '.' + str(sys.version_info.minor) +'/site-packages/botocore'

HTML_FOLDER = '/adminlte/aws/res'
ADMINLTE_ROOT_DIR = ROOT_DIR + '/adminlte'
Expand Down
3 changes: 1 addition & 2 deletions services/lambda_/drivers/LambdaCommon.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import os
import sys
from datetime import datetime, timedelta

import botocore
Expand All @@ -25,8 +26,6 @@ class LambdaCommon(Evaluator):
'provided'
]

## <TODO>
# RUNTIME_PATH = os.path.join(os.environ.get("VENDOR_DIR"), 'aws/aws-sdk-php/src/data/lambda/2015-03-31/api-2.json.php')
RUNTIME_PATH = _C.BOTOCORE_DIR + '/data/lambda/2015-03-31/service-2.json'
CW_HISTORY_DAYS = [30, 7]

Expand Down

0 comments on commit 9a9f90d

Please sign in to comment.