Open brettf opened 7 years ago
Until this bug is fixed, is the command above the recommended workaround?
@ShaunEdiger -- yes.
You can also create the definition and version in one go:
aws greengrass create-function-definition --cli-input-json '{
"Name": "'"MyGroup_Function_Definition"'",
"InitialVersion": {
"Functions": [
{
"FunctionArn": "arn:aws:lambda:::function:GGIPDetector:1",
"FunctionConfiguration": {
"Environment": {},
"MemorySize": 32768,
"Pinned": true,
"Timeout": 3
},
"Id": "'"$(uuidgen)"'""
}]
}
}'
You can also create the definition and version in one go:
aws greengrass create-function-definition --cli-input-json '{ "Name": "'"MyGroup_Function_Definition"'", "InitialVersion": { "Functions": [ { "FunctionArn": "arn:aws:lambda:::function:GGIPDetector:1", "FunctionConfiguration": { "Environment": {}, "MemorySize": 32768, "Pinned": true, "Timeout": 3 }, "Id": "'"$(uuidgen)"'"" }] } }'
I am this function to create lambda function for automatic IP detector in AWS Greengrass group. I need you small help in understanding what exactly is variable "$(uuidgen)" is pointing to ? can I simply reaplce this variable with Group id ?
Something like this : "Id": "'"5c128568-b756-49cf-9e33-0b7e845852bd"'""
Can you please let me know.
I am using following command to create greengrass function
aws greengrass create-function-definition --cli-input-json '{
"Name": "'"MyGroup_Function_Definition"'", "InitialVersion": { "Functions": [ { "FunctionArn": "arn:aws:lambda:::function:GGIPDetector:1", "FunctionConfiguration": { "Environment": {}, "MemorySize": 32768, "Pinned": true, "Timeout": 3 }, "Id": "'"4"'" }] }
}'
Also, the function "arn:aws:lambda:::function:GGIPDetector:1" is already created in lambda just like normal function.
But I couldn't able to see the above function added in my GreenGrass Group. What can be the problem ?
The default behavior of an instantiated group should support auto-discovery of the Greengrass Core. A command like this works:
Essentially, use
create-function-defintion-version
and addarn:aws:lambda:::function:GGIPDetector:1
just like any other Lambda with the function configuration as shown above.