Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

316
Vistas
CloudFront can't use S3 Website origin, only REST origin Cloudformation

I'm trying to automate spinning up a CloudFront distribution with S3 origin. I'd like to set the origin to the S3 website URL, e.g. mysite.com.s3-website-us-east-1.amazonaws.com. So, I thought my Cloudformation template should look like this:

{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
    "myDistribution" : {
        "Type" : "AWS::CloudFront::Distribution",
        "Properties" : {
            "DistributionConfig" : {
                "Origins" : [ {
                    "DomainName" : "mysite.com.s3-website-us-east-1.amazonaws.com",
                    "Id" : "myS3Origin",
...

However that yields the following error:

The parameter Origin DomainName does not refer to a valid S3 bucket.

Which is true, so I can specify the S3 bucket. But I want my origin to be the website endpoint. My non-automated workaround is to deploy with the S3 REST endpoint and update the origin in the UI after.

{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
    "myDistribution" : {
        "Type" : "AWS::CloudFront::Distribution",
        "Properties" : {
            "DistributionConfig" : {
                "Origins" : [ {
                    "DomainName" : "mysite.com.s3.amazonaws.com",
                    "Id" : "myS3Origin",
...

According to the docs:

The DNS name of the Amazon Simple Storage Service (S3) bucket or the HTTP server from which you want CloudFront to get objects for this origin.

I can't find anything about a website endpoint origin. http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-origin.html#cfn-cloudfront-origin-originpath

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I don't think you've included quite all the relevant parts of your configuration.

The issue here is that an origin that is an S3 website hosting endpoint is not an S3 origin -- it's a custom origin.

Anything other than the REST endpoint of a bucket is always a custom origin.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda