Skip to content

Commit

Permalink
dev-520: add sentry and bump python version to 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
uptickmetachu committed Dec 13, 2023
1 parent 1401af8 commit 809c375
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# docker build --platform linux/amd64 -t ${IMAGE} --target=base .
FROM public.ecr.aws/lambda/python:3.9-x86_64
FROM public.ecr.aws/lambda/python:3.11-x86_64
ENV PRINCE_FILENAME=prince-14.1-linux-generic-x86_64
RUN yum clean all \
&& yum install -y unzip giflib \
Expand Down
10 changes: 9 additions & 1 deletion lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,23 @@
import sys
import traceback
import xml.etree.ElementTree as ET
from itertools import chain
from urllib.parse import urlparse
from uuid import uuid4

import boto3
import requests
import sentry_sdk
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration

S3_RETRY_COUNT = 10

sentry_sdk.init(
dsn=os.environ.get("SENTRY_DSN", ""),
integrations=[
AwsLambdaIntegration(),
],
)


def init():
# If there's any files in the font directory, export FONTCONFIG_PATH
Expand Down
5 changes: 3 additions & 2 deletions lambda_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
requests==2.22.0
boto3==1.21.17
requests==2.31.0
boto3==1.34.0
sentry-sdk==1.39.0

0 comments on commit 809c375

Please sign in to comment.