0

I need to configure serverless.yaml as following:
1) 3 environments (stages) - dev ,qa ,prod
2) qa and dev should be ip restricted.

CloudFront serving static html files from S3.
S3 bucket : qa/index.html
dev/index.html
prod/index.html

1)
The goal is to create a cloudfront distribution that has 3 behaviours that distribute to the corresponding origin (dev,qa,prod)
-another option is to create 3 separate cloudfronts for each stage
2)
In order to ip restrict I understand that WAF is required, and WAF is applied to the CF so, dev and qa can share cloudfront where prod should be in separate.

The question is, does serverless framework has plugins/documentation somewhere that can be helpful in such configuration? Didn't find anything. Is it possible to have multiple cloudfronts in the serverless.yml based on stage?

Thanks.

Alex Portnoy
  • 224
  • 4
  • 8

1 Answers1

0

I see you want to deploy a "serverless website" for your Static HTML content, powered by AWS's S3, CloudFront, and WAF services. And that you seek to use the Serverless Framework to launch these resources.

However, you make no mention of Lambda.

Serverless Framework's primary use case is to deploy Lambda functions, and resources related to these Lambda functions. This includes the ones you mentioned S3, CF, WAF, etc.

I think you should take a look at Terraform for a configuration management tool. Terraform does not specialize in anything, and it's designed to handle everything.

I understand the confusion. Serverless is a term that covers a few areas of modern cloud computing.

solsglasses
  • 177
  • 5