aws-greengrass-group-setup
                                
                                
                                
                                    aws-greengrass-group-setup copied to clipboard
                            
                            
                            
                        Auto activate "Automatically detect and override connection information" in a Group
The default behavior of an instantiated group should support auto-discovery of the Greengrass Core. A command like this works:
aws greengrass create-function-definition-version \
--function-definition-id 4d941bc7-92a1-4f45-8d64-EXAMPLEf76c3 \
--functions '[{"FunctionArn":"arn:aws:lambda:::function:GGIPDetector:1","Id":"1","FunctionConfiguration":{"Pinned":true,"MemorySize":32768,"Timeout":3}}]' \
--region us-west-2
Essentially, use create-function-defintion-version and add arn:aws:lambda:::function:GGIPDetector:1 just like any other Lambda with the function configuration as shown above.
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 ?