dependabot[bot] on pip
Bump pyjwt from 1.7.1 to 2.4.0 … (compare)
dev
stage and I'm wondering about creating a v1
stage, does this sound reasonable or is there a better approach?
.chalice/config.json
file isn't included in the deployment. Have tested with chalice package --single-file OUT
, and the file isn't included in deployment.zip. Has anyone else seen this issue?
Hi All! I have been using chalice for my project. Current I'm in a stage with implementing authorizer for my project. And I'm also using AWS Cognito for authentication & authorization.
My 1st question is, When I came across Chalice Authorization document, I noticed a note that "In Chalice, all the authorizers are configured per-route", So is it possible to configure API gateway level authorization rather than against every route level? Is chalice 'Built-in-Authorizers' functionality is for API gateway level or it's same as route level?
And My 2nd question is, I came across CognitoUserPoolAuthorizer and I used it too . But is it possible to use CognitoUserPoolAuthorizer functionality logic inside 'Built-in-Authorizers' auth_handler lambda for authorising? If yes, How Could I invoke CognitoUserPoolAuthorizer inside my auth_handler lambda?
Hello team!
Chalice deploy API gateway for access to defined Lambda functions, which is cool. Want to know, is it possible in Chalice define a request model and attach it to all or any methods of API gateway deployed by Chalice? For make request validation based on defined request model (JSON structure)?
In FAQ have read thta feature set is purposefully small, is this feature included to that 'small set'? Didn't find it in documentation.
"errorMessage": "'list' object has no attribute 'get'",
"errorType": "AttributeError",
"stackTrace": [
" File \"/var/task/chalice/app.py\", line 1202, in __call__\n self.current_request = handler.create_request_object(event, context)\n",
" File \"/var/task/chalice/app.py\", line 1597, in create_request_object\n resource_path = event.get('requestContext', {}).get('resourcePath')\n"
]
I've got a chalice project that utilizes the tzwhere==3.0.3
python package. Said package is dependent upon Shapely (https://pypi.org/project/Shapely/). I've never had issue packaging my chalice app (chalice package ...
) until recently.
Now I get the classic:
Could not install dependencies:
shapely==1.8.0
You will have to build these yourself and vendor them in
the chalice vendor folder.
Well, I notice that 1.8.0 recently came out (Oct 25th). Everything was fine when previously pulling in 1.7.1.
I don't understand why chalice cannot install this new version. If I do a pip download shapely==1.8.0
it grabs the wheel file (.whl). Which chalice supports?! Any ideas?
chalice package
to work with a private git repo defined in the requirements.txt like this: repo@git+https://USER:TOKEN@git.private.com/scm/project/repo@release-1.0? I've tried $USER:$TOKEN, {USER}:{TOKEN}
Hi, I'm new to Chalice. Thanks to the team for making the API development and deployment into AWS a breeze.
Are there any recommendations for IAM permissions to develop in Chalice? My use case is the development of proof of concepts projects, so I don't have different environments (prod, dev, test, etc). I have a team of developers and I want them to be able to create APIs using Chalice, but if I try to put some control on the developer's access then they will start getting errors, for example when Chalice is trying to create an IAM role. Currently, developers can't create IAM roles, and I find it difficult, if not impossible, to allow them the freedom to deploy new APIs without granting admin access to the developers.
Do you have any suggestions? How do you handle a scenario like that?
@eze1981_gitlab what I did was abstract the IAM out of Chalice by converting the deploying definition to Terraform with "chalice package --pkg-format terraform". The output of that is generated everytime (so we can fully leverage the swagger), but there are certain components of the terraform which I maintain using a simple template script + jinja2. I use the following template definition in terraform to get that done:
data "template_file" "chalice_api_swagger" {
template = <<EOF
{{ chalice_api_swagger | tojson(indent=4) }}
EOF
}
This way you can avoid relying on Chalice to parse your app.py for things like "ecs = boto3.client('ecs')" to generate IAM permissions and simply manage IAM via IaC. I've also abstracted IAM in the app.py to "assume role" to a decoupled IAM definition. So any permission a dev needs must be deployed via that IAM management strategy and not have to fight with their code.
Hi guys. I am trying to play and make some code with Chalice and wanna run package with SAM CLI like sam local start-api
with sam build -u
before. The api returns me 502 error with logs :2022-03-18 11:43:19,283 | No response from invoke container for APIHandler
2022-03-18 11:43:19,283 | Invalid lambda response received: Lambda response must be valid json
When i run the project with chalice local
it works. Unit test also is green. Do i need to do some extra to run with sam cli or just let me forget about that and use chalice local instead and be sure that it will works on AWS well
chalice build...
?+ /root/.local/bin/poetry run chalice package build/ --stage dev-us
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/bin/chalice", line 5, in <module>
from chalice.cli import main
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/lib/python3.9/site-packages/chalice/cli/__init__.py", line 39, in <module>
from chalice.cli import newproj
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/lib/python3.9/site-packages/chalice/cli/newproj.py", line 37, in <module>
import inquirer
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/lib/python3.9/site-packages/inquirer/__init__.py", line 1, in <module>
from inquirer.prompt import prompt
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/lib/python3.9/site-packages/inquirer/prompt.py", line 1, in <module>
import inquirer.themes as themes
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/lib/python3.9/site-packages/inquirer/themes.py", line 4, in <module>
from blessed import Terminal
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/lib/python3.9/site-packages/blessed/__init__.py", line 14, in <module>
from blessed.terminal import Terminal # type: ignore
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/lib/python3.9/site-packages/blessed/terminal.py", line 21, in <module>
from .keyboard import (_time_left,
File "/root/.cache/pypoetry/virtualenvs/oe-premise-service-a1Tiz-ue-py3.9/lib/python3.9/site-packages/blessed/keyboard.py", line 19, in <module>
import curses
File "/root/.pyenv/versions/3.9.11/lib/python3.9/curses/__init__.py", line 13, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'
chalice delete
does nothing. :(