I have to create many AWS apigateway apis. All apis will use a Lambda function for invocation. These new apis will also include below common steps.
- API type as Regional and a REST API
- Add a POST Method
- Method Execution Settings
- Invocation Type=Lambda Function and also choose respective Lambda Function.
- CORS Settings
- Lambda Permissions
- Integration Response Settings
- Deploy API
- Include stage in API Usageplan
- Redeploy API
Here is apigateway clone API SYNOPSIS.
SYNOPSIS
create-rest-api
--name <value>
[--description <value>]
[--clone-from <value>]
[--binary-media-types <value>]
[--minimum-compression-size <value>]
[--api-key-source <value>]
[--endpoint-configuration <value>]
[--policy <value>]
[--api-version <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
How to clone an apigateway API from existing apigateway API from CLI and avoid doing all the repeated steps mentioned above.