The URL used by bloginfo('template_directory')
is based on various functions that determine the URL to the theme directory, which are ultimately based on the WP_CONTENT_URL
constant, which is the URL to the wp-content/
directory.
The initial value for this constant, if you don’t define it yourself, is based on the site URL set in the database, in Settings > General.
In your case, based solely on your question because I don’t really know Cloudfront, you probably want something like this:
define( 'WP_CONTENT_URL', 'https://xxx.cloudfront.net/wp-contebt' );
As far as I can tell, normally WP_CONTENT_URL
will use WP_SITEURL
, but this does not happen on multisite installations, which you must be using.