Docker and AWS Batch
Docker (for customers On-Premise or your local PC)
â ī¸ If docker is not installed, contact SYS.
Download Image
âšī¸ You only need to do this the first time. If you have already pulled this image version on your machine, you can skip this step.
- Authenticate to the repository and pull the official images:
đ You can find the credentials on Confluence.
export AWS_ACCESS_KEY_ID=EXAMPLE
export AWS_SECRET_ACCESS_KEY=EXAMPLE
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 288817675132.dkr.ecr.eu-west-1.amazonaws.com
- Download the ConnectX image:
docker pull 288817675132.dkr.ecr.eu-west-1.amazonaws.com/connectx:<VERSION>
Running the ETL
- Navigate to the folder containing the ETL.
- Run (â ī¸ use
sudoon servers!):
docker run --rm -v $(pwd):/usr/src/app 288817675132.dkr.ecr.eu-west-1.amazonaws.com/connectx:<VERSION> python3 main.py -e dev
AWS Batch
Manual Execution via AWS Batch (from portal-cron)
- Note: The correct command can be found in the client's ETL technical sheet.
aws batch submit-job --region eu-west-1 \
--job-name <job-name> \
--job-queue <job-queue> \
--job-definition <job-definition> \
--container-overrides 'command=["python3", "main.py", "-e", "<ENV>"]'
Modifying AWS Batch Execution Parameters
- Default resources: ConnectX jobs normally run with 1 vCPU and 2 GB RAM.
- When to increase: For large initial loads (T0) or heavy jobs, you may need more CPU, memory, or a longer timeout.
Example: Submitting a T0 job with 2 vCPU, 8 GB RAM, 8-hour timeout:
aws batch submit-job \
--region eu-west-1 \
--job-name <job-name>_t0 \
--job-queue <job-queue> \
--job-definition <job-definition> \
--timeout '{"attemptDurationSeconds": 28800}' \
--container-overrides '{
"command": ["python3", "main.py", "-e", "prod"],
"resourceRequirements": [
{"type": "VCPU", "value": "2"}, # Number of CPUs for this job
{"type": "MEMORY", "value": "8192"} # Memory in MB
]
}'
Parameter explanations:
| Parameter | Meaning | Default | How to change |
|---|---|---|---|
VCPU |
Number of CPUs the job uses | 1 | Increase if job is heavy |
MEMORY |
RAM in MB | 2048 | Increase if job needs more memory |
attemptDurationSeconds |
Maximum time job can run | 3600 | Increase for long-running jobs (like T0) |
command |
Command to run inside the container | - | Change if you need a different Python script |
â ī¸ Important:
- Memory and timeout can be adjusted independently, depending on your job needs. Remove the unneeded parts of the command.
- To increase vCPUs beyond the default, contact SYS.
AWS Batch Console
Access AWS Console
- Navigate to https://impresoftengage.awsapps.com/start
- Form the menu, choose the AWS account "Portal".
- Click on "DeveloperDefaultAccess".
Navigate to AWS Batch Console
- Search "AWS Batch" in the top bar and select the service.
- In the left menu, select "Jobs" (Italian: "Processi").
- Disable "Advanced search".
- Choose the "Job queue" corresponding to the client.
- Selecting a job shows additional info. Click "Log stream name" to view ConnectX output.