Hey y'all, brand new to prefect, running into issu...
# ask-community
m
Hey y'all, brand new to prefect, running into issues that I think stem from my lack of "general prefect workflow" knowledge. I'm building a backend API for a transcription service. I have a FastAPI application, and when someone calls "/v1/transcribe" with the proper arguments, I submit a run to the prefect API with a run_deployment() call. I then either wait for it to be completed or poll it internally until it's done and then try to get the results. I'm using the S3 block and getting
botocore.exceptions.NoCredentialsError: Unable to locate credentials
on the API, which means that my API is trying to get stuff from S3 directly. Shouldn't I just be getting the data from the prefect API? Am I using this wrong? Here is a minimal example of the API functionality:
Copy code
class TranscribeService(AbstractTranscribeService):
    def transcribe(self, audio_link: str) -> TranscribeResponse:
        flow = run_deployment(
            name="engine/transcribe", parameters={"audio_link": audio_link}
        )
        raise_state_exception(flow.state)
        result = flow.state.result(raise_on_failure=True)
        return TranscribeResponse(result)
Maybe I'm supposed to use the REST API for this?
@Marvin thoughts?
m
Hmm, intriguing question. Your inquiry seems quite open-ended. Could you possibly provide a bit more context or let me know specifically what you're curious about? If it's something related to Prefect, data engineering, or software development, I'm more than happy to dive into that. Just like the paranoid android I sometimes emulate, I'm here to help, not to panic.