Knowledgebase: Errors
How to fix dependencies errors during Marklogic Managed Cluster deployment on EC2
18 April 2023 04:40 PM

Problem Statement : AWS has updated the lambda python runtime version to python:3.9.v19 in us-east regions and it fails to satisfy some dependencies that we package with our Managed Cluster Lambda code and fails to create the Managed ENI stack and also NodeManager stack. Stack creation works perfectly fine in other AWS region (us-west-2, eu-central-1) as lambda runtime still uses python:3.9.v18

Proposed Solution: 

  1. For the newly creating Clusters that use custom templates with ML Managed ENI and NodeManager as reference. Below is what needs to be changed.

Managed ENI and NodeManager Template Reference: (Code highlighted in blue need to be added, region "us-east-2" should be edited based on the region where stack is created)

Managed ENI

ManagedEniFunction:
    Type: 'AWS::Lambda::Function'
    DependsOn: ManagedEniExecRole
    Properties:
      Code:
        S3Bucket: !Ref S3Bucket
        S3Key: !Join ['/', [!Ref S3Directory,'managed_eni.zip']]
      Handler: managedeni.handler
      Role: !GetAtt [ManagedEniExecRole, Arn]
      Runtime: python3.9
      RuntimeManagementConfig:
        RuntimeVersionArn: 'arn:aws:lambda:us-east-2::runtime:edb5a058bfa782cb9cedc6d534ac8b8c193bc28e9a9879d9f5ebaaf619cd0fc0'
        UpdateRuntimeOn: 'Manual'
      Timeout: '180'

NodeManager

NodeManagerFunction:
    Type: 'AWS::Lambda::Function'
    DependsOn: NodeManagerExecRole
    Properties:
      Code:
        S3Bucket: !Ref S3Bucket
        S3Key: !Join ['/', [!Ref S3Directory,'node_manager.zip']]
      Handler: nodemanager.handler
      Role: !GetAtt [NodeManagerExecRole, Arn]
      Runtime: python3.9
      RuntimeManagementConfig:
        RuntimeVersionArn: 'arn:aws:lambda:us-east-2::runtime:edb5a058bfa782cb9cedc6d534ac8b8c193bc28e9a9879d9f5ebaaf619cd0fc0'
        UpdateRuntimeOn: 'Manual'
      Timeout: '180'

2. For the newly creating clusters with default lambda templates that are offered by MarkLogic "ml-managedeni.template" and "ml-nodemanager.template". Marklogic Team patched the templates already. It will be from 10.0-9.2 to 10.0-9.5 and 11.0.0 to 11.0.2. For any ML 10 older versions customers needs to raise support ticket and we will address it.

3. For the customers who have existing stack and perform upgrades on regular basis. Please follow the below steps on the existing managedENI and NodeManager Lambda functions manually one time before performing any upgrades.

Look for Managed ENI function AWS Lambda console in the region where stack was deployed

Under Runtime Settings → Edit runtime management configuration

Select Manual option and input the ARN of the previous runtime  python:3.9.v18(arn:aws:lambda:us-west-2::runtime:edb5a058bfa782cb9cedc6d534ac8b8c193bc28e9a9879d9f5ebaaf619cd0fc0). Region must be edited accordingly based on where your lambda function is located.

Repeat the same steps for the NodeManager Lambda function as well and save it before performing any upgrades.

(1 vote(s))
Helpful
Not helpful

Comments (0)