【发布时间】:2021-03-10 05:56:46
【问题描述】:
我有一个如下所示的 lambda 函数:
client = boto3.client('glue')
glueJobName = "Python Glue Script"
inputtedData = "A1B2C3D4E5"
school = "testing"
def lambda_handler(event, context):
response = client.start_job_run(JobName = glueJobName, Arguments = {'==inputtedData': inputtedData, '--school': school})
return response
这将开始运行我的胶水作业,其中包含一个脚本。但是,我想将参数 'inputtedData' 和 'school' 传递给这个脚本,这样当脚本启动时,这些变量将像这样输入到我的 syncData 函数中:
def syncAttendance(inputtedData, school):
schoolName = school
Data = inputtedData
print(schoolName, Data)
syncData(inputtedData, school)
如何在胶水脚本中接收这些变量?
【问题讨论】:
-
注意
'==inputtedData'中的错字
标签: python aws-lambda boto3 aws-glue