Skip to content

Conversation

printedheart
Copy link
Contributor

No description provided.

@printedheart
Copy link
Contributor Author

Update . Need to fix head on cfront list

@printedheart
Copy link
Contributor Author

Please test as a Feature Integration:

Support for Environment Stages and Colors
We have Red, Yellow, Blue, and Green Deployment Environments
Red - Dev | Yellow - Stage/Test | Blue/Green - Prod/QA

Added supported environment variables:
color="red"
stage="dev"

This allows for multiple Lambda Function names as well

Adding the host as a CNAME to Cloudfront works:
Ex: red.test.com CNAME/Alias d42mp9zdib7he3.cloudfront.net

==================================================
Proof run:

Successfully associated Lambda functions with CloudFront

CLOUDFRONT_DISTRIBUTION_ID="E2NLPLVW7TK8BE" node create-invalidation.js
{ Location: 'https://cloudfront.amazonaws.com/2017-03-25/distribution/E2NLPLVW7TK8BE/invalidation/I124JZO7DAUL8C',
Invalidation:
{ Id: 'I124JZO7DAUL8C',
Status: 'InProgress',
CreateTime: 2018-03-19T17:48:02.874Z,
InvalidationBatch: { Paths: [Object], CallerReference: '2018-03-19T17:48:02.311Z' } } }
colony005:pre-red Fitch$ make deploy
node ./validate.js
./node_modules/.bin/serverless deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Service files not changed. Skipping deployment...
Service Information
service: Lambda-Edge-Prerendercloud
stage: red
region: us-east-1
stack: Lambda-Edge-Prerendercloud-red
api keys:
None
endpoints:
None
functions:
viewerRequest: Lambda-Edge-Prerendercloud-red-viewerRequest
originRequest: Lambda-Edge-Prerendercloud-red-originRequest
CLOUDFRONT_DISTRIBUTION_ID="E2NLPLVW7TK8BE" node deploy.js
Lambda-Edge-Prerendercloud-red-viewerRequest
Lambda-Edge-Prerendercloud-red-originRequest
[ { FunctionName: 'Lambda-Edge-Prerendercloud-red-viewerRequest',
EventType: 'viewer-request' },
{ FunctionName: 'Lambda-Edge-Prerendercloud-red-originRequest',
EventType: 'origin-request' } ]
before []
after [ { EventType: 'viewer-request',
LambdaFunctionARN: 'arn:aws:lambda:us-east-1:422025336571:function:Lambda-Edge-Prerendercloud-red-viewerRequest:49' },
{ EventType: 'origin-request',
LambdaFunctionARN: 'arn:aws:lambda:us-east-1:422025336571:function:Lambda-Edge-Prerendercloud-red-originRequest:49' } ]

@printedheart printedheart mentioned this pull request Mar 23, 2018
@printedheart
Copy link
Contributor Author

TODO:
Sill have some error control work to do:
Programmatically cleanup failed CloudFormation Deletions

  • stuck sls buckets
  • stuck lambda from cloudfront publish invalidations
  • checks for invalidations on cloudfront
@jotto jotto force-pushed the master branch 2 times, most recently from e231b68 to e0ca127 Compare May 5, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant