# Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights served. # SPDX-License-Identifier: MIT-0 # # Permission is hereby granted, free of charge, to any person taining a copy of this # software and associated documentation files (the oftware"), to deal in the Software # without restriction, including without limitation the rights use, copy, modify, # merge, publish, distribute, sublicense, and/or sell copies the Software, and to # permit persons to whom the Software is furnished to do so. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY ND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF RCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL E AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN NNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ARG PYTHON_REPO ARG RUNTIME_VERSION ARG TARGETPLATFORM FROM --platform=${TARGETPLATFORM} ${PYTHON_REPO}:${RUNTIME_VERSION} as compiler ARG FUNCTION_DIR COPY ${FUNCTION_DIR} ${LAMBDA_TASK_ROOT}/ RUN chmod 0644 $(find ${LAMBDA_TASK_ROOT} -type f) RUN chmod 0755 $(find ${LAMBDA_TASK_ROOT} -type d) ARG USER RUN yum install -y shadow-utils RUN /usr/sbin/adduser ${USER} USER ${USER} CMD [ "lambda_function.lambda_handler" ]