I have create a docker container like this:
FROM python:3.7-slim-buster
COPY . /opt/
WORKDIR /opt/
RUN pip install -r requirements.txt
EXPOSE 8080
CMD ["python3", "/opt/myscript.py"]
And I call my Fargate container from Lambda like this:
response = client.run_task(
cluster="my-cluster",
launchType = 'FARGATE',
taskDefinition= "my-definition",
networkConfiguration={
'awsvpcConfiguration': {
'subnets': ['my-subnet'],
}
},
Its working fine. But now I want to be able to run two different python scripts dependent on which lambda function I am calling Fargate from, so e.g.
Lambda function 1: -> ["python3", "/opt/myscript.py"]
Lambda function 2: -> ["python3", "/opt/my_other_script.py"]
How would I achieve something like that?