-
Notifications
You must be signed in to change notification settings - Fork 0
Api gateway configuration
Those are the steps I have used, in order to give you an idea about how to configure the Lambda and the HTTP API. However, this might not be exactly the case for you - for example AWS might change their interface somewhat in the future, or you might need to configure some additional settings. If something does not work exactly like I have described you'd need to do some tinkering to figure it out. Dealing with AWS can be frustrating, if you are not sufficiently knowledgeable in cloud computing, and are not willing to put in the effort to learn, but it is definitely doable. I find chatGPT extremely helpful with that.
Just a word of caution about AWS - be very careful how you set up your budgets, authentications and throttling, or you might end up owing Amazon a lot of money (few hundred dollars to few hundred-thousand dollars, depending on who and how has abused your account or services).
Log in to AWS console and go to Lambda.
Click "Create Function".
Select "Author from scratch".
Enter the desired function name that matches the one in the aws-config in visual studio.
For runtime select ".Net 8 (C#/F#/PowerShell)".
For architecture select "x86_64".
Click create function.
Go to visual studio.
Copy the desired lambda function JSON config as explained in 1.2. Folder aws-configs.
Right click on the project and select `Publish to AWS Lambda...`
Choose "Re-deploy to existing" and choose the correct name.
Log in to AWS console and go to API Gateway
Click get started with API Gateway or whatever the screen says to get to the main window for the API Gateway service.
Click "Create API" and select HTTP API - Build.
For Integrations, choose Lambda.
Choose the region your Lambda is published on, choose the lambda function itself, and choose version 2.0 .
Choose a name for your API - I use lowercase hyphen separated, like so "transpile-single-dml-to-single-json".
Click Next.
For method choose POST.
For Resource path enter "/{proxy+}" - (which is a greedy parameter that will capture any path and send it to our lambda).
Make sure that "Integration target" has the desired lambda function name selected and Click next.
For "Define stages" leave it as is - "$default", Auto-deploy .
Click Next and Create.
Once the API is created, open it, go to "Project > Throttling" and set Burst limit and Rate limit values.
(I use 5000 as burst and 0.116 as rate, which means that I will have 5000 executions available, but once those are exhausted it will take 12 hours give or take, to replenish them)
You can configure logging under "Monitor"
"Deploy > Stages > $default" to see the invocation URL for your API.
You can configure Authorization under "Develop > Authorization".
You can configure CORS, under "Develop > CORS".
Home
Grammar How To
Compiler How To
CLI Compiler - How to
CLI Compiler - How to - help
CLI Compiler - How to - parse-file
CLI Compiler - How to - parse-folder
CLI Compiler - How to - encrypt-file
CLI Compiler - How to - decrypt-file
CLI Compiler - How to - recrypt-file
CLI Compiler - How to - encrypt-folder
CLI Compiler - How to - decrypt-folder
CLI Compiler - How to - recrypt-folder
API Compiler - How to
API Compiler - How to - Example 1
API Compiler - How to - Example 2
API Compiler - How to - Example 3
API Compiler - How to - Example 4
API Compiler - How to - Example 5
AWS Compiler - How to
AWS technical overview
API gateway configuration
output - low
output - medium
output - high
output - themes
Grammar - Lists
Grammar - Comments
Grammar - Links
Grammar - Decorators
Grammar - Tags
Grammar - More on Tags
Grammar - Directives
Grammar - Dot Notation
Grammar - Tildes
Grammar - Files
Deprecated - Slash Notation
Deprecated - Delimiter Mode
Describe Basics - v0.6
Describe Tags - v0.7
Describe Links - v0.8
Describe Decorators - v0.9
Describe Lines - v1.0
Describe Doubles - v1.1