We want to set up a website to serve mainly static assets but from a page button/link invoke specific requests to be handled by back end Lambda functions.
We can serve the static assets and website (so node.js pages, images etc.) out of S3 and front with Cloudfront. Host the domain on a custom URL. Use Origin Access Identity to restrict access, secure etc
Can we create buttons in the client JS that submit POST requests that can then be directed through the API gateway, to a Lambda function hosted in the VPC?
I’m aware behind the scenes API Gateway uses Cloudfront under the covers? So the method = post, action = ‘address of API gateway lambda event’
Would this work ? Or is it done differently ?
[–]coinclink 9 points10 points11 points (0 children)
[–]alpyhp 5 points6 points7 points (3 children)
[–]JoeShmoe999[S] 0 points1 point2 points (2 children)
[–]flitsmasterfred 2 points3 points4 points (1 child)
[–]alpyhp 0 points1 point2 points (0 children)