How to export / import API Gateway Mappings

0

We are working on a process to create a backup of all API Gateway Mappings in our environments to have on file, in case someone deletes the mappings. I see a way to export the current mappings, using the get-api-mappings, but how could I import the mappings back in case the mappings get deleted and need to be restored? Any assistance would be appreciated.

Thank you,

1 réponse
3
Réponse acceptée

Hello,

According to your question, you have a question to restore the exported API Gateway mappings.


Through the steps, you can restore the API Gateway mappings:

  1. Export the mappings and save as a JSON file
aws apigateway get-mappings --domain-name <Domain_Name>
  1. Create new mappings with the exported mapping file
aws apigateway create-mapping --domain-name <Domain_Name> --cli-input-json <Mapping_File>

[+] create-api-mapping (AWS CLI Command Reference)


If I have missed anything or answered wrong, please feel free to ask me again. Also you have any questions, comment please!

profile picture
répondu il y a 6 mois
profile pictureAWS
EXPERT
vérifié il y a 6 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions