inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

Running TagUI RPA as a Lambda Function

124

pavan bbva

작성한 질문수 1

0

I am trying to run a simple TagUI flow as a Lambda function using container images. I have made a Dockerfile using the bootstrap and function.sh from this tutorial:

FROM amazon/aws-lambda-provided:al2
When using RPA Architecture (<a href="https://hkrtrainings.com/rpa-architecture"  title="rpa-architecture" alt="rpa-architecture">rpa-architecture</a>)
RUN yum install -y wget nano php java-1.8.0-openjdk unzip procps

RUN curl https://intoli.com/install-google-chrome.sh | bash

RUN wget https://github.com/kelaberetiv/TagUI/releases/download/v6.46.0/TagUI_Linux.zip \
    && unzip TagUI_Linux.zip \
    && rm TagUI_Linux.zip \
    && ln -sf /var/task/tagui/src/tagui /usr/local/bin/tagui \
    && tagui update 

RUN sed -i 's/no_sandbox_switch=""/no_sandbox_switch="--no-sandbox"/' /var/task/tagui/src/tagui

ADD tr.tag /var/task/tagui/src/tr.tag

WORKDIR /var/runtime/
COPY bootstrap bootstrap
RUN chmod 755 bootstrap

WORKDIR /var/task/
COPY function.sh function.sh
RUN chmod 755 function.sh

CMD [ "function.sh.handler" ]

My function.sh:

function handler () {
   cp -r /var/task/tagui/src/* /tmp;
   chmod 755 /tmp/tagui;
   OUTPUT=$(/tmp/tagui /tmp/tr.tag -h);
   echo "${OUTPUT}";
}

Notes:

When I run as a Lambda I get the error:

./tmp/tagui/src/tagui: line 398: 56 Trace/breakpoint trap (core dumped) $chrome_command --user-data-dir="$TAGUI_DIR/chrome/tagui_user_profile" $chrome_switches $window_size $headless_switch $no_sandbox_switch > /dev/null 2>&1

When I run the container from Docker it runs perfectly. I have tried increasing both the memory and timeout of the function.

The end goal I am trying to achieve is to have a Lambda function triggered by an API gateway that can receive a TagUI RPA flow and run it.

답변 0

26-2 이론문제 재탕

1

61

1

왜 이름이 Graph engineering인가요?

1

50

2

개인 블로그에 정리하면서 ppt 자료 캡처 해서 넣어도 되나요?

1

56

2

run.py 실행하니 아예 전체다 돌아가요 코드가

1

44

2