Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

greedy regex sometimes replaces too many parameters in a single resource template #6

Open
OlafConijn opened this issue Jul 14, 2022 · 1 comment

Comments

@OlafConijn
Copy link
Contributor

OlafConijn commented Jul 14, 2022

update

  • rootcause of the problem is that the regex here matches greedy. multiple ${xxxx} ${yyyy} expressions get collapsed into 1.
  • I believe the regex should be /\$\{.*?\}/g instead of /\$\{.*\}/g

previous issue (not the rootcause) below

currenlty, execute-api:Invoke permissions use arn:aws:execute-api:partition:account:* as resource.
would be great to map the properties of this call into a template:

"ApiEndpoint": "abcdef123.execute-api.us-east-1.amazonaws.com",
"Method": "GET",
"Stage": "prod",
"Path": "/path/to/resource",
```_
@OlafConijn OlafConijn changed the title execute-api:Invoke permissions could have more specific resource greedy regex sometimes replaces too many parameters in a single resource template Jul 14, 2022
iann0036 added a commit that referenced this issue Jul 15, 2022
@iann0036
Copy link
Owner

Awesome catch, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants