Comments (8)
Hi Otto !
No problem, thanks for all your assistance !
from cloudfront-authorization-at-edge.
Hi @RuyOliveiraRunaHR ! Does this help? https://github.com/aws-samples/cloudfront-authorization-at-edge#deploying-changes-to-the-react-app-or-static-site
from cloudfront-authorization-at-edge.
Increment parameter Version
upon redeploying, that makes sure all Lambda@Edge functions get redeployed
from cloudfront-authorization-at-edge.
Thanks Otto for your help.
Just to clarify, I'm making a change in code of src->lambda-edge->check-auth->index.ts file.
I'm going to take a look at the link above.
Thanks once again.
from cloudfront-authorization-at-edge.
Opss...I did something wrong:
I've edited the file template.yaml at the root directory as below:
CheckAuthHandler:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/lambda-edge/check-auth/
Handler: bundle.handler
Role: !GetAtt LambdaEdgeExecutionRole.Arn
Timeout: 5
Version: 2 # Dummy field, change this to force CloudFormation to deploy this resource if none of the other properties change
and now I'm getting to following error when I run sam build:
samcli.commands.validate.lib.exceptions.InvalidSamDocumentException: [InvalidResourceException('CheckAuthHandler', 'property Version not defined for resource of type AWS::Serverless::Function')] ('CheckAuthHandler', 'property Version not defined for resource of type AWS::Serverless::Function')
any advice ? Thanks.
from cloudfront-authorization-at-edge.
Don't put them on the AWS::Serverless::Function but instead on the custom resources for the code update (they publish the Lambdas to a new version, and inject config into them).
Easiest way: you can just use the parameter overrides when deploying, as Version
is a parameter of this template, and passed to the custom resources.
So sam deploy --template-file packaged.yaml --stack-name <Your Stack Name> --capabilities CAPABILITY_IAM --parameter-overrides "Version=<specify a new version here every time you want the Lambda Custom Resources to redeploy>"
from cloudfront-authorization-at-edge.
Hi Otto,
Thanks for your help, it worked perfectly !
One thing more, have you used samconfig.toml to create multiple environments? did it worked ?
In my case, I'm trying to create develop and prodction envs, but it looks like sam deploy is not reading parameter-overrrides from samconfig.toml.
Thanks once again.
from cloudfront-authorization-at-edge.
it worked perfectly
Awesome! 🎉
One thing more, have you used samconfig.toml to create multiple environments? did it worked ?
Sorry mate I'm not an expert on that. I usually use plain sam deploy
statements, just make sure to switch to the s3 deployment bucket in the right account.
from cloudfront-authorization-at-edge.
Related Issues (20)
- Refresh issue after token expires HOT 8
- On signout Required String parameter 'redirect_uri' is not present HOT 5
- Possible Open Redirect (CWE-601) in sample code HOT 2
- nonce cookies are not expired HOT 1
- [Feature request] Support multiple Cognito user pool clients HOT 4
- custom domain is not redirecting to cognito hosted ui HOT 1
- Getting blocked by CORS policy but unable to figure out the source HOT 5
- Node version bump HOT 7
- Custom IDP with Amplify and Auth at Edge HOT 9
- Fail on delete of the stack HOT 3
- Function must be in an Active state error on deploying the solution HOT 7
- Errors from Lambda when destroiyng the stack HOT 2
- Cognito TAGS HOT 1
- How Do I add User Pool attributes to Cookies? HOT 1
- A potential risk in cloudfront-authorization-at-edge which can be used to upload malicious code. HOT 4
- Having the ability to tune logs HOT 1
- Deployment to eu-west-2 fails with error: Encountered a permissions error performing a tagging operation HOT 4
- Missing User-Agent header in Post request to cognito HOT 4
- Question: redirecting after download from S3 HOT 2
- 'JavaScript heap out of memory' when running npm run build HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudfront-authorization-at-edge.