Skip to content

Commit

Permalink
chore: fix sync imgs (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
LIEN-YUHSIANG authored Oct 12, 2023
1 parent 4762298 commit bdd2031
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lambda/sync-image/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def post_imgskey(key):
dt_now = datetime.now().strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z'

# Creaet board_id, ads_id from the event payload we got
board_id, ads_id, _ = key.split('/')
board_id, ads_id = key.split('/')

# Create new item in the dynamoDB
item = {
Expand All @@ -29,6 +29,7 @@ def post_imgskey(key):


def handler(event, context):
print(event)

# Get event payload and get imgs information
key = event['Records'][0]['s3']['object']['key']
Expand Down

0 comments on commit bdd2031

Please sign in to comment.