ฉันพยายามเข้าไปปฎิบัติงานเป็นภาษาไพธอน lambda ฟังก์ชันกับ dependencies และฉันกำลังจะเกิดข้อผิดพลาดจาก docker โปรแกรมดีมอน(อยู่ Centos ลินุกซ์)นั้นคือการไม่ถูกต้องให้พวกเมานท์ spec. ข้อผิดพลาดคือ "/path//to/my/code:/asset-input:z,delegated": invalid mode: delegated
ต่อไปนี้คือสิ่งที่ฉันรหัสดูเหมือนว่าสำหรับ lambda ฟังก์ชัน:
python_function = Function(
self,
id="PythonFunction",
runtime=Runtime.PYTHON_3_9,
handler="app.main.lambda_handler",
timeout=Duration.seconds(20),
code=Code.from_asset(
path=str(python_function_path.resolve()),
bundling=BundlingOptions(
image=Runtime.PYTHON_3_9.bundling_image,
command=[
"bash",
"-c",
"pip install -r requirements.txt -t /asset-output && cp -au . /asset-output",
],
),
),
memory_size=128,
log_retention=RetentionDays.TWO_WEEKS,
)
มันทำงานได้ดีของแมคแต่พยายามจะยกขึ้นจาก Centos คือความไม่ประสบความสำเร็จ