Bootstrap FreeKB - Amazon Web Services (AWS) - Deploy API Gateway using the AWS CLI
Amazon Web Services (AWS) - Deploy API Gateway using the AWS CLI


This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.

This also assumes you are already created an API Gateway. For example, let's say you've created a REST API. The aws apigateway get-rest-apis command can be used to list your API Gateway REST APIs.

 ~]$ aws apigateway get-rest-apis
{
    "items": [
        {
            "id": "2885zecrwj",
            "name": "my-rest-api",
            "createdDate": "2024-04-29T04:33:11+00:00",
            "apiKeySource": "HEADER",
            "endpointConfiguration": {
                "types": [
                    "PRIVATE"
                ]
            },
            "disableExecuteApiEndpoint": false,
            "rootResourceId": "sf6n2hrix7"
        }
    ]
}

 

By default, creating the REST API does not deploy the REST API as can be seen by the fact that the aws apigateway get-deployments command returns an empty list (no deployments).

~]$ aws apigateway get-deployments --rest-api-id 2885zecrwj
{
    "items": []
}

 

The next thing you will typically do is to Update API Gateway with Methods (GET POST PUT PATCH DELETE LIST).




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 23c7f5 in the box below so that we can be sure you are a human.