EB: Debugging why files in .ebextensions don't seem to be executing for configuring https

0

My goal is to configure the node.js EB environment for HTTPS. I am not using load balancing, so I'm using the procedure outlined here

I have created an .ebextensions folder with a couple of configuration files and I've verified that folder is ending up in the .zip archive I upload to the environment.

But the configuration doesn't seem to work, and I'm trying to debug this.

Questions:

  • is there a way for me to ensure the configuration files are seen by the EB engine process? When I inspect /var/log/eb-engine.log the only thing I see is 'Cleaned ebextensions subdirectories from app staging directory.'
  • should I be able to see the .ebextension files on the instance?
  • are there other ways I can tell if my configuration files are being read?

(Edit: I'm aware that I can configure nginx using the .platform/conf.d/https.conf file. But .ebextensions configuration file also adds other files to the instance, and I'm not sure whether I can simply include those files under .platform/<subdir> too.)

asked 22 days ago128 views
1 Answer
0

Hello,

You have reached out to re:Post community to ask questions below:

  1. is there a way for me to ensure the configuration files are seen by the EB engine process? When I inspect /var/log/eb-engine.log the only thing I see is 'Cleaned ebextensions subdirectories from app staging directory.'

  2. should I be able to see the .ebextension files on the instance?

  3. are there other ways I can tell if my configuration files are being read?

(Edit: I'm aware that I can configure nginx using the .platform/conf.d/https.conf file. But .ebextensions configuration file also adds other files to the instance, and I'm not sure whether I can simply include those files under .platform/<subdir> too.)

I am going to answer your questions below:

  1. How to check ebextensions files' command execution via EB log files

As you saw from '/var/log/eb-engine.log' file, there isn't specific records for commands executed by ebextensions files.

In this case, you can check execution results from 'cfn-init.log' and 'cfn-init-cmd.log' files.

example output of 'cfn-init.log' file:

yyyy-MM-dd hh:mm:ss,SSS [INFO] -----------------------Starting build-----------------------
yyyy-MM-dd hh:mm:ss,SSS [INFO] Running configSets: Infra-EmbeddedPostBuild
yyyy-MM-dd hh:mm:ss,SSS [INFO] Running configSet Infra-EmbeddedPostBuild
yyyy-MM-dd hh:mm:ss,SSS [INFO] Running config *
yyyy-MM-dd hh:mm:ss,SSS [INFO] Command <CMD_00> succeeded
yyyy-MM-dd hh:mm:ss,SSS [INFO] Command <CMD_01> succeeded
yyyy-MM-dd hh:mm:ss,SSS [INFO] Command <CMD_02> succeeded
yyyy-MM-dd hh:mm:ss,SSS ...

example output of 'cfn-init-cmd.log' file:

yyyy-MM-dd hh:mm:ss,SSS [INFO] ************************************************************
... [INFO] ConfigSet _OnInstanceBoot
... [INFO] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
... [INFO] Config AWSEBBaseConfig
... [INFO] ============================================================
... [INFO] Command clearbackupfiles
... [INFO] Completed successfully.
...
... [INFO] ************************************************************
... [INFO] ConfigSet Infra-EmbeddedPreBuild
... [INFO] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
... [INFO] Config *
... [INFO] ************************************************************
... [INFO] ConfigSet Infra-EmbeddedPostBuild
... [INFO] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
... [INFO] Config *
... [INFO] ============================================================
... [INFO] Command <CMD_00>
... [INFO] Completed successfully.
... [INFO] ============================================================
... [INFO] Command <CMD_01>
... [INFO] Completed successfully.
... [INFO] ============================================================
...
  1. Is it possible to see the ebextensions files on the instance?

As you checked a message from 'eb-engine.log' file, there is a logic to clean ebextensions config files from app staging directory to prevent someone from checking the resources.

'Cleaned ebextensions subdirectories from app staging directory.'

Therefore, It is not possible to see ebextensions file after bootstrapping application source bundle file to the EC2 instance.

  1. are there other ways I can tell if my configuration files are being read?

As I answered from 1), you can check If your configuration files are being read, executed from logs files like 'cfn-init.log' and 'cfn-init-cmd.log' and more.

You can check these files by accessing to the instances directly, or collecting logs by creating bundle logs from EB console.

I hope above answers help.

If you need professional assistance from AWS Premium Support, please feel free to create support cases to get help from AWS's support engineers.

Regards,

AWS Premium Support

profile pictureAWS
SUPPORT ENGINEER
answered 17 days 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