CmdID

CmdID / aws / aws greengrass

aws greengrass create-function-definition-version

Creates a version of a Lambda function definition that has already been defined. AWS CLI reference

1 example 4 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To create a version of the function definition

The following create-function-definition-version example creates a new version of the specified function definition. This version specifies a single function whose ID is Hello-World-function, allows access to the file system, and specifies a maximum memory size and timeout period.

aws greengrass create-function-definition-version --cli-input-json "{\"FunctionDefinitionId\": \"a1b2c3d4-5678-90ab-cdef-EXAMPLE11111\",\"Functions\": [{\"Id\": \"Hello-World-function\", \"FunctionArn\": \""arn:aws:lambda:us-west-2:123456789012:function:Greengrass_HelloWorld_Counter:gghw-alias"\",\"FunctionConfiguration\": {\"Environment\": {\"AccessSysfs\": true},\"Executable\": \"greengrassHelloWorldCounter.function_handler\",\"MemorySize\": 16000,\"Pinned\": false,\"Timeout\": 25}}]}"Identify
Its output
{
    "Arn": "arn:aws:greengrass:us-west-2:123456789012:/greengrass/definition/functions/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111/versions/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
    "CreationTimestamp": "2019-06-25T22:03:43.376Z",
    "Id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
    "Version": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"
}

For more information, see Run Lambda functions on the AWS IoT Greengrass core in the AWS IoT Greengrass Developer Guide.

Options

4 in the AWS CLI reference
--amzn-client-tokenA client token used to correlate requests and responses.
--default-configThe default configuration that applies to all Lambda functions in this function definition version.
--function-definition-idThe ID of the Lambda function definition.
--functionsA list of Lambda functions in this function definition version.