Skip to content

Commit

Permalink
remove separate credential handler
Browse files Browse the repository at this point in the history
  • Loading branch information
lrakai committed Nov 19, 2023
1 parent 7f1c9b5 commit f01bb43
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
10 changes: 6 additions & 4 deletions src/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os

CONFIG = {
'client_id' : os.environ.get('AWS_CLIENT_ID'),
'client_secret' : os.environ.get('AWS_CLIENT_SECRET'),
'region_name' : os.environ.get('AWS_REGION', 'us-west-2')
}
'credentials': {
'credential_id': os.environ.get('AWS_CLIENT_ID'),
'credential_key': os.environ.get('AWS_CLIENT_SECRET'),
},
'region_id': os.environ.get('AWS_REGION', 'us-west-2'),
}
13 changes: 0 additions & 13 deletions src/credentials.py

This file was deleted.

11 changes: 3 additions & 8 deletions src/vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import time

from config import CONFIG
from credentials import credential_helper

import boto3
import botocore
Expand Down Expand Up @@ -83,21 +82,17 @@ def create_new_session(event):
region_name=event['region_id']
)

def timed_handler():
def timed_handler(event, context):
start = time.time()

handler({}, None)
result = handler(event, context)

end = time.time()
print(end - start)

return result


def create_new_session(event):
return credential_helper.create_new_session()


if __name__ == '__main__':
result = timed_handler()
result = timed_handler(CONFIG, None)
print(result)

0 comments on commit f01bb43

Please sign in to comment.