
Run an Amazon Athena query through an AWS Step Functions Express Workflow and return the rows in one synchronous Amazon API Gateway call, with no Lambda function.
StartSyncExecution, and the workflow calls Athena through native service integrations, so there's no AWS Lambda function in the request path..sync integration pattern, so the workflow starts the query with StartQueryExecution and polls GetQueryExecution in a Wait and Choice loop. When the query succeeds, GetQueryResults reads the rows, which must fit in the 256 KiB Step Functions payload. After 10 polls the workflow calls StopQueryExecution and fails, so the caller gets an HTTP 500 before the 29-second integration timeout.git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-sfn-athena/typescript/cdkcd apigw-sfn-athena/typescript/cdk/cdknpm installnpx cdk deployPOST with a queryString to the ApiEndpoint output, for example with curl --aws-sigv4. See the README in the GitHub repo for the commands.cd apigw-sfn-athena/typescript/cdk/cdk then npx cdk destroy.