amplify-category-api
amplify-category-api copied to clipboard
Append env to api names created by Amplify in API Gateway
Is this feature request related to a new or existing Amplify category?
api
Is this related to another service?
No response
Describe the feature you'd like to request
For devOps purposes, I would like to be able to determine (both programmatically and via the API Gateway Console) which api endpoint id (for example: vtq4fhk3dh (for https://vtq4fhk3dh.execute-api.us-east-1.amazonaws.com) corresponds to a particular programmatic name (for example: myApi) for a specific amplify env (for example: dev or test).
This is not needed for client software or lambda software as they are built with the information from aws-exports.js and amplify-meta.json respectively. This is needed for devOps where I am dealing with as-deployed content.
Describe the solution you'd like
Append the Amplify env to the API name when it is created, like Amplify does for dynamo tables.
In dynamo, I am able to determine the specific table because Amplify appends the env to the table name, for example, myTable-dev and myTable-test.
In API Gateway, I have two APIs (one for each env) but both named myApi, making them indistinguishable by name.
Describe alternatives you've considered
Hacking into either aws-exports.js or amplify-meta.json to pull out the info based on configuration rather than actual deployment. Clearly not a good approach.
Additional context
This should not be a breaking change. Client and backend code has the direct reference via the id. Existing deployments could continue with the old name. Only newly created APIs would have this env suffix to the name.
Is this something that you'd be interested in working on?
- [ ] 👋 I may be able to implement this feature request
Would this feature include a breaking change?
- [ ] ⚠️ This feature might incur a breaking change