serverless-api-cloudfront | Serverless Plugin - CloudFront distribution | Serverless library
kandi X-RAY | serverless-api-cloudfront Summary
kandi X-RAY | serverless-api-cloudfront Summary
Serverless Plugin - CloudFront distribution in front of your API Gateway
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of serverless-api-cloudfront
serverless-api-cloudfront Key Features
serverless-api-cloudfront Examples and Code Snippets
Community Discussions
Trending Discussions on serverless-api-cloudfront
QUESTION
I want to have multiple (based on stage param) AWS cloudfront distribution. So if --stage dev passed it would deploy a different CloudFront dist than --stage qa. Each stage should update/create a distribution based on the stage params.
Is it possible to achieve with serverless.yml?
I have found the following plugin serverless-api-cloudfront , not sure it will create additional distribution if domain name is changed, and not sure it is possible to add origins with this plugin.
Thanks
...ANSWER
Answered 2019-Nov-27 at 16:44Is it possible to achieve with serverless.yml?
Yes. Yes it's possible and it's already built in. Your config will be simpler if you use the plugin serverless-api-cloudfront
(rather than declaring a AWS::CloudFront::Distribution
resource yourself). You will get one distribution-per-stage, without having to jump through any hoops.
** EDIT
Expanding on my original post: It does seem that the serverless-api-cloudfront
plugin's README is lacking in usage examples (at the time of this writing). I do suggest that anyone reading this post should go to the plugin's github and help the author by PR'ing a better README.
Here's a link to a blog article I found that shows an example of how to write up a AWS::CloudFront::Distribution
directly in your serverless.yml. It's only 1 resource, so you may not even want to depend on a plugin anyway. https://medium.com/yld-blog/caching-in-with-cloudfront-using-serverless-5a174651ab14
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install serverless-api-cloudfront
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page