I am using this command to import a REST API from a swagger file definition
aws apigateway import-rest-api --body fileb://pet-store-api-v2.json
The output I got is as follows:
{
"id": "API_ID",
"name": "Simple PetStore V2 (AWS CLI)",
"createdDate": "2023-07-25T20:29:52-06:00",
"version": "2023-07-26T00:02:09Z",
"apiKeySource": "HEADER",
"endpointConfiguration": {
"types": [
"EDGE"
]
},
"disableExecuteApiEndpoint": false
}
Here is the swagger file content:
{
"swagger": "2.0",
"info": {
"version": "2023-07-26T00:02:09Z",
"title": "Simple PetStore V2 (AWS CLI)"
},
"host": "{API_ID}.execute-api.{REGION}.amazonaws.com",
"basePath": "/test",
"schemes": [
"https"
],
"paths": {
"/pets": {
"get": {
"responses": {
"200": {
"description": "200 response"
}
}
}
},
"/pets/{petId}": {
"get": {
"parameters": [
{
"name": "petId",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "200 response"
}
}
}
}
}
}
Everything seems to work fine however when I launch a GET request the server sends a 403 Forbidden error code
https://{API_ID}.execute-api.{REGION}.amazonaws.com/pets
{
"message": "Forbidden"
}
Do I need to perform additional steps in order to get my REST API completely functional?