Upload the Lambda function to AWS
Procedure
What to do next
Now we need to create parameters for the Lambda function. These parameters will be used to configure Talend Administration Center url and the credentials for authentication.
This is a best practice to use parameters for all environment variables in order to avoid hard coded values.
- Go to AWS Lambda dashboard > Functions, and click on function S3LambdaFunctionHandler.
- In Code tab, add four environment variables as below:
- tac_endpoint = http://<TAC_IP>:8080/tac, where <TAC_IP> is the IP address of the Talend Administration EC2 host.
- tac_username = <TAC username> (Default user = admin@company.com).
- tac_password = <TAC password> (Default password = admin).
- tac_task_name = customers_csv_to_xml
- Click Save.
You have successfully created, uploaded and configured in AWS Lambda dashboard your Lambda Java function. This was the hard part of the demo.
Now we can configure S3 to invoke the Lambda function whenever a CSV file is uploaded in S3.