Comments (7)
I believe this should be in good shape now, please re-open of comment if you continue to experience issues.
from aegis.
I see, it's a problem with the default policy that's getting created. You can set your own in aegis.yaml
to use for now, but I'll have a fix soon.
from aegis.
Give 1.15.1 a try https://github.com/tmaiaroto/aegis/releases/tag/1.15.1
Should resolve the issue, I was able to create a new role to quickly test that it was working and then was able to log into the protected API via Cognito. Note you will need to setup a Cognito Pool.
I still need to add integration tests around the CLI tool, sorry about that.
Side note: I'm thinking about leveraging some other tools for resource management. It's clearly becoming not only a time consuming and intricate thing, but a completely separate concern of its own. That is to say, without broader community support here, I'd rather focus on the application framework over infrastructure management.
from aegis.
Thanks so much for the quick response. I'm getting a different error now.
Created a new execution role for Lambda: arn:aws:iam::171733487074:role/aegis_lambda_role
There was a problem updating the Lambda function.
ValidationException: 1 validation error detected: Value '' at 'role' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
status code: 400, request id: 609b687f-7fd1-11e8-a3f7-ad2f99a490cc
exit status 255
However, running it a second time it seems to work
Using existing execution role for Lambda: arn:aws:iam::171733487074:role/aegis_lambda_role
Created Lambda function: arn:aws:lambda:us-west-2:171733487074:function:aegis_cognito_example
prod API URL: https://x8m5l1fzrg.execute-api.us-west-2.amazonaws.com/prod
from aegis.
from aegis.
So I had another tiny bug (as in one character) that created an issue there. However, even after fixing that, I ran into yet another issue...This time with AWS. When you create new IAM roles, they aren't immediately available to assign to your Lambda functions.
I put in a wait for a few seconds which I thought had solved the issue before. Apparently not in testing this again here.
So I'm going to put in a retry in a very specific case (when this error is seen and when a new role was created).
Obviously since its timing, running deploy a second time works. Just poor UX.
from aegis.
I added retries for this step. It'll try 5 times and wait 5 seconds between each attempt with a total of 1 minute timeout for the entire event of trying to associate the IAM to the Lambda. In limited testing it works. However, it is a known "issue" with AWS (quotes on issue because it's really just a fact of life I suppose). Tools like Terraform run into this too, you'll see it in their output to the console too. I believe Terraform just waits forever. I've seen waiting messages for 30 minutes or more before.
It shouldn't really take that long in this case. That's why I originally had it at 4 seconds. So I think it should be good now. This fix will be released in the next patch version (hopefully along with the Cognito issue you raised). In the meantime, run deploy a second time. It should not ever be an issue again after you have that IAM role created though. So you probably only need to run deploy once now for every change you make.
from aegis.
Related Issues (20)
- increase code coverage, documentation, and examples HOT 1
- S3 Object Router - routing by event?
- Custom Services and related work
- 3rd Party Add-Ons
- nil Tracer HOT 1
- token contains an invalid number of segments HOT 6
- Find infrastructure management solution
- Ensure Cognito rate limit is not hit HOT 1
- Unable to build new project with go modules enabled HOT 1
- Default aegis_lambda_role needs VPC policy HOT 1
- AppSync/GraphQL support
- build github.com/tmaiaroto/aegis: cannot find module for path github.com/kamilsk HOT 3
- aegis deploy error HOT 5
- Set up integration tests
- How could one change the default 3 second timeout for (Basic Settings) HOT 4
- There was a problem building the Go app for the Lambda function. HOT 4
- Add support for GCP and Azure
- Support HTTP API
- Github landing page documentation HOT 1
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 aegis.