訪問參數我有一個CloudFormation
模板,看起來像這樣:CloudFormation - 從LAMBDA代碼
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This template will deploy stuff",
"Parameters":{
"myParamToLambdaFunction" : {
"Description" : "Please enter the the value",
"Type" : "String",
"ConstraintDescription" : "must have some value."
}
},
"Resources": {
"SecGrpValidatorFromCFTemplate": {
"Type": "AWS::Lambda::Function",
"Properties": {
"FunctionName": "mylambdafunctionname",
"Handler": "myfile.lambda_handler",
"Role": {
"Fn::GetAtt": ["somerole", "Arn"]
},
"Timeout": "30",
"Runtime": "python2.7",
"Code": {
"S3Bucket":"mybucket",
"S3Key":"mylambdafunction.zip"
}
}
}
}
我需要的myParamToLambdaFunction
值傳遞給lambda函數。
有沒有辦法做到這一點?
不是我真正想要的。我需要將CloudFormation的輸入參數的值注入到Lambda中的一個變量中。我已將這個問題發佈到AWS論壇以及更多詳細信息:[鏈接到AWS論壇上的問題](https://forums.aws.amazon.com/thread.jspa?threadID=236582&tstart=0) – Asdfg
您可以在node.js中執行它,因爲你可以在CF中直接提供lambda代碼,但是在python中我不認爲有辦法做到這一點。 –