Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change setting SSL_CERT_FILE to an empty file in /var/runtime #1663

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ RUN apt-get update && apt-get install -y dos2unix
RUN dos2unix /app/publish/bootstrap-al2023.sh && \
mv /app/publish/bootstrap-al2023.sh /app/publish/bootstrap && \
chmod +x /app/publish/bootstrap
RUN touch /app/publish/empty-certificates.crt


FROM base
Expand Down
1 change: 1 addition & 0 deletions LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ RUN apt-get update && apt-get install -y dos2unix
RUN dos2unix /app/publish/bootstrap-al2023.sh && \
mv /app/publish/bootstrap-al2023.sh /app/publish/bootstrap && \
chmod +x /app/publish/bootstrap
RUN touch /app/publish/empty-certificates.crt


FROM base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# certs in the default cert directory which can be overriden by the SSL_CERT_DIR env var. On AL2023
# The default cert bundle file, via symbolic links, resolves to being in a file under the default cert directory.
# This means the default cert bundle file is double loaded causing a cold start performance hit. This logic
# sets the SSL_CERT_FILE to a noop file if SSL_CERT_FILE hasn't been explicitly
# sets the SSL_CERT_FILE to an empty file if SSL_CERT_FILE hasn't been explicitly
# set. This avoid the double load of the default cert bundle file.
if [ -z "${SSL_CERT_FILE}"]; then
export SSL_CERT_FILE="/tmp/noop"
export SSL_CERT_FILE="/var/runtime/empty-certificates.crt"
fi

# This script is used to locate 2 files in the /var/task folder, where the end-user assembly is located
Expand Down
Loading