diff --git a/ecs/Dockerfile/Dockerfile b/ecs/Dockerfile/Dockerfile new file mode 100644 index 00000000..6934fec5 --- /dev/null +++ b/ecs/Dockerfile/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.9 + +ENV TZ="Asia/Tokyo" + +WORKDIR /usr/src/app +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt +COPY main.py ./ + +CMD [ "python", "./main.py" ] \ No newline at end of file diff --git a/ecs/Dockerfile/main.py b/ecs/Dockerfile/main.py new file mode 100644 index 00000000..5b66d418 --- /dev/null +++ b/ecs/Dockerfile/main.py @@ -0,0 +1,19 @@ +import boto3 +import os +from os import path + +# EVENT_BUCKET = os.environ["EVENT_BUCKET"] +# EVENT_OBJECKT_KEY = os.environ["EVENT_OBJECKT_KEY"] + +# DESTINATION_BUCKET = os.environ["DESTINATION_BUCKET"] +# DESTINATION_OBJECKT_DIR = os.environ["DESTINATION_OBJECKT_DIR"] + +# s3 = boto3.resource("s3") + +# destination_object_key = path.join( +# DESTINATION_OBJECKT_DIR, path.basename(EVENT_OBJECKT_KEY) +# ) +# event_object = s3.Object(DESTINATION_BUCKET, destination_object_key) +# event_object.copy({"Bucket": EVENT_BUCKET, "Key": EVENT_OBJECKT_KEY}) + +print('呼び出し成功') \ No newline at end of file diff --git a/ecs/Dockerfile/requirements.txt b/ecs/Dockerfile/requirements.txt new file mode 100644 index 00000000..1db657b6 --- /dev/null +++ b/ecs/Dockerfile/requirements.txt @@ -0,0 +1 @@ +boto3 \ No newline at end of file