Unify and manage your data

Migrate custom LCA to AWS Lambda

You can migrate custom LCAs from LCA service to AWS Lambda.

To migrate your custom LCAs from LCA service to AWS Lambda, you must have an AWS account with appropriate permissions to create the Lambda function and AWS S3 bucket.

To migrate a custom LCA to the AWS Lambda service:
  1. Add maven dependencies to the pom.xml file.
    In the dependencies section of your pom.xml file, add the dependencies given below.

    To refer our sample pom.xml file in the repository for the AWS Lambda LCA, click Sample pom.xml file.

    <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>5.8.2</version>
                <scope>test</scope>
            </dependency>
    
            <dependency>
                <groupId>org.skyscreamer</groupId>
                <artifactId>jsonassert</artifactId>
                <version>1.3.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.reltio</groupId>
                <artifactId>life-cycle-framework-lambda</artifactId>
                <version>2023.1.12.0</version> <!--Please refer the  https://bitbucket.org/reltio-ondemand/life-cycle-lambda-sample/src/master/pom.xml for the latest version
                 also for all other maven artifacts-->
            </dependency>
    		<dependency>
    			<groupId>com.reltio</groupId>
    			<artifactId>life-cycle-framework</artifactId>
    			<version>2023.1.12.0</version>
    			<exclusions>
    				<exclusion>
    					<artifactId>jackson-core</artifactId>
    					<groupId>com.fasterxml.jackson.core</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-annotations</artifactId>
    					<groupId>com.fasterxml.jackson.core</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-databind</artifactId>
    					<groupId>com.fasterxml.jackson.core</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-dataformat-cbor</artifactId>
    					<groupId>com.fasterxml.jackson.dataformat</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-annotations-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-core-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-databind-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-dataformat-smile-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-module-jaxb-annotations-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-core-asl</artifactId>
    					<groupId>org.codehaus.jackson</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-mapper-asl</artifactId>
    					<groupId>org.codehaus.jackson</groupId>
    				</exclusion>
    			</exclusions>
    		</dependency>
    		<dependency>
    			<groupId>com.reltio.services.lca</groupId>
    			<artifactId>reltio-lca-service-executor</artifactId>
    			<version>2023.1.12.0</version>
    			<exclusions>
    				<exclusion>
    					<artifactId>jackson-core</artifactId>
    					<groupId>com.fasterxml.jackson.core</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-annotations</artifactId>
    					<groupId>com.fasterxml.jackson.core</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-databind</artifactId>
    					<groupId>com.fasterxml.jackson.core</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-dataformat-cbor</artifactId>
    					<groupId>com.fasterxml.jackson.dataformat</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-annotations-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-core-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-databind-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-dataformat-smile-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-module-jaxb-annotations-shaded</artifactId>
    					<groupId>com.fasterxml.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-core-asl</artifactId>
    					<groupId>org.codehaus.jackson</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>jackson-mapper-asl</artifactId>
    					<groupId>org.codehaus.jackson</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>commons-library</artifactId>
    					<groupId>com.reltio.commons</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>swagger-annotations</artifactId>
    					<groupId>io.swagger.core.v3</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>swagger-annotations</artifactId>
    					<groupId>io.swagger</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>commons-codec</artifactId>
    					<groupId>commons-codec</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>commons-collections</artifactId>
    					<groupId>commons-collections</groupId>
    				</exclusion>
    
    				<exclusion>
    					<artifactId>fast-classpath-scanner</artifactId>
    					<groupId>io.github.lukehutch</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>httpclient</artifactId>
    					<groupId>org.apache.httpcomponents</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>kryo</artifactId>
    					<groupId>com.esotericsoftware</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>kryo-shaded</artifactId>
    					<groupId>com.esotericsoftware.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>opencsv</artifactId>
    					<groupId>net.sf.opencsv</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>reltio-to-objects</artifactId>
    					<groupId>com.reltio</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>joda-time</artifactId>
    					<groupId>joda-time</groupId>
    				</exclusion>
    			</exclusions>
    		</dependency>
    		<dependency>
    			<groupId>com.fasterxml.jackson.core</groupId>
    			<artifactId>jackson-core</artifactId>
    			<version>2.13.3</version>
    		</dependency>
    		<dependency>
    			<groupId>com.fasterxml.jackson.core</groupId>
    			<artifactId>jackson-databind</artifactId>
    			<version>2.13.3</version>
    		</dependency>
    		<dependency>
    			<groupId>com.fasterxml.jackson.dataformat</groupId>
    			<artifactId>jackson-dataformat-smile</artifactId>
    			<version>2.13.3</version>
    		</dependency>
    		<dependency>
    			<groupId>com.amazonaws</groupId>
    			<artifactId>aws-lambda-java-core</artifactId>
    			<version>1.2.1</version>
    		</dependency>
    		<dependency>
    			<groupId>com.amazonaws</groupId>
    			<artifactId>aws-java-sdk-core</artifactId>
    			<version>1.12.178</version>
    			<exclusions>
    				<exclusion>
    					<artifactId>joda-time</artifactId>
    					<groupId>joda-time</groupId>
    				</exclusion>
    				<exclusion>
    					<artifactId>commons-logging</artifactId>
    					<groupId>commons-logging</groupId>
    				</exclusion>
    			</exclusions>
    		</dependency>
    		<dependency>
    			<groupId>junit</groupId>
    			<artifactId>junit</artifactId>
    			<version>4.13.2</version>
    			<scope>test</scope>
    		</dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>4.7.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.reltio.services.lca</groupId>
                <artifactId>reltio-lca-service-test-framework</artifactId>
                <version>2023.1.12.0</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>reltio-lca-service</artifactId>
                        <groupId>com.reltio.services.lca</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
                    
  2. Change the base class of the LCA Handler.
    In the custom LCA that you had built on legacy LCA, change the parent class from LifeCycleActionBase to com.reltio.lifecycle.lambda.LifeCycleActionHandler.

    To view an example, click Sample LCA Handler with appropriate parent class.

  3. Change the imports information.
    In the custom classes that you created for legacy LCA, modify the following information:
    1. Change com.fasterxml.reltio.jackson.databind.ObjectMapper to com.fasterxml.jackson.databind.ObjectMapper.
    2. Change com.fasterxml.reltio.jackson.databind.JsonNode to com.fasterxml.jackson.databind.JsonNode.
  4. Run the maven install command where pom.xml is located.
    mvn clean install
    On successful build, the jar and "-jar-with-dependencies.jar" files are generated in the target folder.
You can use the same jar file to create the Lambda function in AWS console. For more information, see topic LCA as AWS Lambda: Deployment.