0

I'm trying to follow the instructions on https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/SSLNET.SingleInstance.html to install a self-signed certificate on an Elastic Beanstalk dev instance. That is, I have (in addition to other prerequisites listed there), a .ebextensions/https-instance-dotnet.config file of the form:

files:
  "C:\\certs\\install-cert.ps1":
     content:
       Echo "I want some SSL"
       import-module webadministration
       ## Settings - replace the following values with your own
       $bucket = "my-bucket"
       $certkey = "example.com.pfx"
       $pwdkey = "password.txt"
       [...]

commands:
  00_install_ssl:
    command: powershell -NoProfile -ExecutionPolicy Bypass -file C:\\certs\\install-cert.ps1 > c:\\certs\\log.txt

I'm publishing from Visual Studio to AWS EB using AWS Toolkit and not seeing errors. The file seems to be formatted correctly according to a YAML validator. But I can't tell if the script is working or not, or even being run, or if C:\certs\install-cert.ps1 and log.txt are being created in my environment.

My question is: How do I debug or trace this so I can see (for example) the results of the Echo commands?

Eric Hirst
  • 1,111
  • 15
  • 31
  • 1
    have you looked in the elastic beanstalk eb-activity log or eb-commandprocessor log? https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html – danimal Apr 11 '19 at 13:51
  • 1
    Thanks @danimal very useful. I'd been meaning to go with the heavy-hammer approach of using the EC2 service and Remote Desktop, but seeing the "You can add your application's log files..." sentence in that link makes it clear that there's a much better way. – Eric Hirst Apr 11 '19 at 17:07

0 Answers0