Zack
03/09/2023, 5:29 PMdeployment = Deployment.build_from_flow(
flow=artist_ranker_etl,
name="artist-ranker-deployment",
entrypoint="artist_ranker.main.handler",
)
deployment.apply()
I'm only seeing it once in the ui for the initial run.redsquare
03/09/2023, 5:39 PMZack
03/09/2023, 5:45 PMdef handler(event: dict, context: LambdaContext):
"""This function is the entry point for the Lambda function"""
<http://log.info|log.info>("starting lambda function for artist ranking")
<http://log.info|log.info>(f"event: {event},context: {context}")
os.environ['PREFECT_HOME'] = '/tmp/prefect'
start = time.time()
# Case 2:
deployment = Deployment.build_from_flow(
flow=artist_ranker_etl,
name="artist-ranker-deployment"
)
deployment.apply()
end = time.time()
print(f"Time to execute: {end - start}")
redsquare
03/09/2023, 6:19 PMZack
03/09/2023, 6:27 PMredsquare
03/09/2023, 6:29 PMZack
03/09/2023, 6:36 PMredsquare
03/09/2023, 6:39 PMZack
03/09/2023, 7:16 PM