Charles Liu
03/09/2021, 5:33 PMMariia Kerimova
03/09/2021, 5:37 PMCharles Liu
03/09/2021, 6:05 PMCharles Liu
03/09/2021, 6:06 PMCharles Liu
03/09/2021, 6:10 PMCharles Liu
03/09/2021, 6:12 PMCharles Liu
03/09/2021, 7:07 PMMariia Kerimova
03/09/2021, 7:15 PMaws codeartifact login
probably complains because AWS credentials are not configured properly (sorry, I'm not codeartifact expert). And yes, you're right, basic template looks like this:
from prefect.storage import Docker
from prefect.run_configs import KubernetesRun
from prefect import task, Flow
import prefect
STORAGE = Docker(
registry_url="<>.dkr.ecr.<>.<http://amazonaws.com|amazonaws.com>",
image_name="<>",
python_dependencies=["<>"],
)
RUN_CONFIG = KubernetesRun()
@task
def print_me():
pass
with Flow(
"ecs-with-ecr-example", storage=STORAGE, run_config=RUN_CONFIG
) as flow:
print_me()
flow.register(project_name="<>")
Charles Liu
03/09/2021, 7:25 PMMariia Kerimova
03/09/2021, 7:39 PMCharles Liu
03/09/2021, 7:51 PMMariia Kerimova
03/09/2021, 8:00 PMCharles Liu
03/10/2021, 8:47 PMCharles Liu
03/10/2021, 8:48 PM