Skip to content

apigw-sfn-express-athena-cdk: Synchronous Athena query API with zero Lambda - #3304

Open
NithinChandranR-AWS wants to merge 1 commit into
aws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-apigw-sfn-express-athena-cdk
Open

NithinChandranR-AWS wants to merge 1 commit into
aws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-apigw-sfn-express-athena-cdk

Conversation

@NithinChandranR-AWS

Copy link
Copy Markdown
Contributor

Description

Amazon API Gateway invokes an AWS Step Functions Express Workflow synchronously that runs an Amazon Athena query and returns the result rows in a single HTTP request/response, with no AWS Lambda functions in the request path.

Architecture

Amazon API Gateway (REST, StartSyncExecution) -> AWS Step Functions Express Workflow -> Amazon Athena (StartQueryExecution REQUEST_RESPONSE, then a Wait/GetQueryExecution/Choice poll loop to completion, then GetQueryResults) -> results returned as JSON. Amazon Athena queries an AWS Glue table over data in Amazon S3; results are written to an S3 results prefix.

Deployed and Tested

Deployed in us-east-1 and tested end-to-end: a POST with a SQL query returns Athena result rows synchronously in one call; the Express execution completes with SUCCEEDED.

Checklist

  • IAM least-privilege (Athena/Glue/S3 scoped to resource ARNs)
  • CDK synth passes
  • Deployed and tested end-to-end
  • Zero Lambda in the request path

…with zero Lambda

Amazon API Gateway invokes an AWS Step Functions Express Workflow
synchronously (StartSyncExecution) that starts an Amazon Athena query,
polls it to completion, and returns the result rows in one HTTP call.
Amazon Athena queries an AWS Glue table over Amazon S3. No AWS Lambda
functions in the request path.

Deployed and tested end-to-end in us-east-1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants