Closed printedheart closed 6 years ago
why delete?
errr, why did you close?
I found errors in testing. Just submitted #6 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
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' } ]