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 Answer
3
Accepted Answer

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
answered 6 months ago
profile pictureAWS
EXPERT
reviewed 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions