amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.
MIT License
941 stars 232 forks source link

Is there a way to retrieve the "Serverless Domain Manager" console outputs? #618

Open nbcchen opened 9 months ago

nbcchen commented 9 months ago

Community Note

Support Question

Question After the serverless deploy command I receive this output

Serverless Domain Manager:
  Domain Name: xxxx
  Target Domain: xxxxxxxx.execute-api.us-east-1.amazonaws.com
  Hosted Zone Id: ABCZZZZZ

This syntax is perfect YAML, however I cannot use it in automation. I can parse it but a) it's buried in console logs generated by Node, Serverless and different plugins and b) I am not sure if that output format is going to be changed in later releases of serverless-domain-manager. I want to run a aws route 53 change-resource-record-sets command immediately after serverless deploy to create a CNAME (apparently, I can only create A and AAAA records, but not CNAME. See https://github.com/amplify-education/serverless-domain-manager/issues/377). Is there a way I can export the above output to a JSON file?

Command Run npx serverless deploy --aws-profile xxx --stage dev

Console Output

Serverless Domain Manager:
  Domain Name: xxxx
  Target Domain: xxxxxxxx.execute-api.us-east-1.amazonaws.com
  Hosted Zone Id: ABCZZZZZ

Domain Manager Configuration Replace this with your own serverless.yml file (anonymized, of course) to help us better resolve your issue.

custom:
  customDomain:
    domainName: foo.example.tld
    basePath: bar
    createRoute53Record: true

Versions

Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.