Marketing router lambda#64807
Conversation
cat5inthecradle
left a comment
There was a problem hiding this comment.
Parameterizing the marketing domain name is my strongest comment, the rest are stylistic suggestions to help simplify the code and use less erb wherever possible.
| Role: !GetAtt MarketingRouterLambdaRole.Arn | ||
| Environment: | ||
| Variables: | ||
| MARKETING_DOMAIN: dev.marketing.dev-code.org |
There was a problem hiding this comment.
Parameterize this so you can have different values for different stacks (environments).
For example, by adding a parameter at the top of the template.
Parameters:
# ...
MarketingOriginDomainName:
Type: String
Default: dev.marketing.dev-code.org
Description: Domain name for marketing site origin.
# ...There was a problem hiding this comment.
We have existing Template Parameters that we can use to construct the fully qualified domain name!
code-dot-org/aws/cloudformation/cloud_formation_stack.yml.erb
Lines 9 to 29 in 607632d
There was a problem hiding this comment.
Thanks for the suggestion. I parameterized it and for now am going with marketing for the prod subdomain and {stack_name}-marketing for others. This might change before release, however.
|
|
cat5inthecradle
left a comment
There was a problem hiding this comment.
Thanks for those changes! This is looking good so far.
When we add new resources, there's always risk of the stack update failing. Fortunately this will get deployed to all environments, so we should notice the issue in Staging and Test. If the DTP this goes out in includes database migrations, then we should watch carefully so we can respond quickly with a fix in the event of failure - as that could leave production with a new database schema but old code.
Co-authored-by: Darin Webb <darin@code.org>
- remove unnecessary cfn output - remove accidental path from lambda
Co-authored-by: suresh <suresh@code.org>
7d9bc87 to
519349e
Compare
This reverts commit e4315ac.
First PR for adding the infrastructure needed to dynamically route requests to the marketing app instead of Pegasus. This PR only includes the lambda function itself and the execution role. Once this is merged, I'll follow up with a 2nd PR adding the function association to the Cloudfront distribution.
Links
Testing story
Tested that the cloudformation is valid using
adhoc:cdn:validate. Ultimately we'll have to deploy for real to test this fully.Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Checklist: