Skip to content

Commit 27f585a

Browse files
authored
Change setting SSL_CERT_FILE to an empty file in /var/runtime (#1663)
1 parent 9ab1c37 commit 27f585a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ RUN apt-get update && apt-get install -y dos2unix
4343
RUN dos2unix /app/publish/bootstrap-al2023.sh && \
4444
mv /app/publish/bootstrap-al2023.sh /app/publish/bootstrap && \
4545
chmod +x /app/publish/bootstrap
46+
RUN touch /app/publish/empty-certificates.crt
4647

4748

4849
FROM base

LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ RUN apt-get update && apt-get install -y dos2unix
4343
RUN dos2unix /app/publish/bootstrap-al2023.sh && \
4444
mv /app/publish/bootstrap-al2023.sh /app/publish/bootstrap && \
4545
chmod +x /app/publish/bootstrap
46+
RUN touch /app/publish/empty-certificates.crt
4647

4748

4849
FROM base

Libraries/src/Amazon.Lambda.RuntimeSupport/bootstrap-al2023.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
# certs in the default cert directory which can be overriden by the SSL_CERT_DIR env var. On AL2023
66
# The default cert bundle file, via symbolic links, resolves to being in a file under the default cert directory.
77
# This means the default cert bundle file is double loaded causing a cold start performance hit. This logic
8-
# sets the SSL_CERT_FILE to a noop file if SSL_CERT_FILE hasn't been explicitly
8+
# sets the SSL_CERT_FILE to an empty file if SSL_CERT_FILE hasn't been explicitly
99
# set. This avoid the double load of the default cert bundle file.
1010
if [ -z "${SSL_CERT_FILE}"]; then
11-
export SSL_CERT_FILE="/tmp/noop"
11+
export SSL_CERT_FILE="/var/runtime/empty-certificates.crt"
1212
fi
1313

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

0 commit comments

Comments
 (0)