title: `replace` not working as expected on AWS CDK api_endpoint value
body: <p>I have a section of AWS CDK Code;</p>
  <pre><code>distribution = Distribution(
              self,
              self.config.get_resource_name(&quot;api distribution&quot;),
              default_behavior=BehaviorOptions(
                  origin= HttpOrigin(domain_name='origin-source-code.com')),
              additional_behaviors={
                  f&quot;{self.config.SUB_DOMAIN}/*&quot;: BehaviorOptions(
                      origin=HttpOrigin(domain_name=api_endpoint.replace('https://', '')),
                      allowed_methods=AllowedMethods.ALLOW_ALL,
  </code></pre>
  <p>Note specifically, this line;</p>
  <pre><code>origin=HttpOrigin(domain_name=api_endpoint.replace('https://', '')),
  </code></pre>
  <p>I've verified, via CfnOutput that the api_endpoint value is this;</p>
  <pre><code>desi-dummy-api-api-gateway.httpapiendpointoutput = https://&lt;secret&gt;.execute-api.us-east-1.amazonaws.com
  </code></pre>
  <p>But, I continue to get this error;</p>
  <pre><code>Resource handler returned message: &quot;Invalid request provided: The parameter origin name cannot contain a colon.
  </code></pre>
  <p>[edit]</p>
  <p>The api_endpoint is a token:</p>
  <pre><code>print(f&quot;API_ENDPOINT = {api_endpoint}&quot;)
  API_ENDPOINT = ${Token[TOKEN.425]}
  </code></pre>
  <p>This doesn't seem to fix the error;
  origin=HttpOrigin(domain_name=Token.as_string(api_endpoint).replace('https://', ''))</p>