Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 27 09:15
    conzy synchronize #1933
  • May 27 09:14
    conzy synchronize #1933
  • May 27 09:07
    conzy synchronize #1933
  • May 27 09:05
    conzy converted_to_draft #1933
  • May 27 09:04
    conzy opened #1933
  • May 27 04:36
    adityamohta synchronize #1932
  • May 27 04:04
    adityamohta synchronize #1932
  • May 26 18:11
    adityamohta converted_to_draft #1932
  • May 26 18:07
    adityamohta synchronize #1932
  • May 26 14:56
    adityamohta opened #1932
  • May 25 23:31
    rafagan commented #1879
  • May 25 18:53
    rafagan commented #1918
  • May 25 05:11
    dependabot[bot] labeled #1931
  • May 25 05:11
    dependabot[bot] opened #1931
  • May 25 05:11

    dependabot[bot] on pip

    Bump pyjwt from 1.7.1 to 2.4.0 … (compare)

  • May 24 20:21
    jamesls labeled #1930
  • May 24 20:21
    jamesls commented #1930
  • May 24 20:12
    jamesls labeled #1925
  • May 24 20:12
    jamesls commented #1925
  • May 24 20:11
    jamesls labeled #1918
Matt Walker
@walkermatt:matrix.org
[m]
Currently I've defined a dev stage and I'm wondering about creating a v1 stage, does this sound reasonable or is there a better approach?
chalice.dev
@chalice-dev
Hey we created a Slack channel for Chalice https://chalice.dev
Ian Meyers
@IanMeyers
Hello all - am upgrading from a (much) older version of chalice, and redeploying. Some changes in how boolean values are handled in config.json, but got it working. However, it seems that the .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?
1 reply
generatorzxy
@generatorzxy_twitter
Hi im new here, is it possible to install https://github.com/aws/chalice in windows 10? because i see all comands are for linux
1 reply
tommaybe
@tommaybe
Hi. Is there any way to find out if my code is running in chalice local mode? I would like to customise CORS settings based on whether running locally or not.
S K
@sarav11:matrix.org
[m]

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?

Mihail Politaev
@mpolitaev

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.

Thanks.
chstrong
@chstrong
Hi there, I've followed the Policy Generation tutorial. I'm using DynamoDB. I can run chalice local, and DynamoDB can be accessed, but if I deploy my code, then I get a permission error. When viewing the generated IAM role, it only has CloudWatch in there, but no permissions in regards to DynamoDB. Any idea what I could be missing?
Dominic
@NoobSkywalker_gitlab
hi there
i have the issue that i have a seperate API that i want to point to a lambda created with chalice
the issue is that i don't know how to map the path properly
so in my app i have
app.route('/' , methods=['POST'] ...
and in my seperate API i want to call this Lambda on a different resource name
is that possible somehow ?
when i use e.g. /example/something and define a post method i just get "MethodNotAllowedError" ( if i use lambda-proxy )
Dominic
@NoobSkywalker_gitlab
if i use lambda in the integration request i get:
"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" ]
shtlrs
@shtlrs

Hey guys,

I'm using chalice to create routes that digest incoming webhooks.

How would I make unit test that would simulate that webhook request?

Will I be needing to construct the request myself ?

teja gowtham
@1tejagowtham_gitlab
Hi guys is there a way where i just need to deploy a single lambda function leaving the rest all in the local using chalice?
Michael Robellard
@subssn21_gitlab
I was hoping someone could let me know the best way to set up a local dependency in the packaging. I have pulled out some code common to both of my chalice projects into a pure python library that is private (Not part of public pip), but whenever I try to reference it in requirements.txt, It doesn't work. I see there seems to be a related bug reported. I tried the attached pull request and it didn't seem to help. I am guessing I need to just put the code in vendors, but I am curious what the best way to do that is? Should I use a symlink (Will it get followed), or should I use a git submodules (Which I have never had much luck with) or is there another way?
Theo Bouwman
@theobouwman
Hi, whats a good way to do json request validation with chalice?
Isaac Rodriguez
@CurroRodriguez
It seems chalice uses a logging level of WARNING by default, and I can't find a way to override the level of the root logger. No matter what I do, the level is set to WARNING. Anyone has seen this before?
Ammar Khan
@RGEv1L
I am facing an issue. Previously i was deploying and later updating my API using chalice deploy --stage dev. But now, i moved my code to aws code pipeline. It deployed new apis instead of updating previous ones.. Any fix on how to generate chalice pipeline template without creating new set of apis?
Ammar Khan
@RGEv1L
HELPPP
Brian Schlatter
@schlatte

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?

Python 3.8.3 and chalice==1.21.2 btw ^^^
Scott Crosby
@iscooter
Has anyone got 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}
2 replies
Theo Bouwman
@theobouwman
Hi, I really need some help with: aws/chalice#1836 thanks in advance!
Brian Schlatter
@schlatte
Yikes!! Found another package that Chalice cannot seem to package anymore. cffi==1.15.0 (release Oct 2021)
Prior version works fine cffi==1.14.6
Anyone know what's going on??
Clive Shumba
@shumbaclv
How do I integrate my Chalice backend with Amplify? Anyone to point me to some docs/resources?
Malaney J. Hill
@malaney
Anyone experiencing a ResourceConflictException when trying to deploy chalice lambdas? An error occurred (ResourceConflictException) when calling the UpdateFunctionConfiguration operation: The operation cannot be performed at this time. An update is in progress for resource: <resource_arn>?
3 replies
Viesturs Proškins
@wieshka
Has anyone else had issues with using chalice.test.Client http.get for Chalice app with custom authorizer, added as blueprint to app ? When launching pytest, none of env variables seems to be loaded which are required for given custom authorizer, leading to everything falling apart.
4 replies
Theo Bouwman
@theobouwman
How can I trigger an event lambda from my code?
3 replies
SPYGodJr
@SPYGodJr
hey. im trying to return a simple webhook message using chalice's app.current_request.json_body but it keeps returning null. can anybody help me out?
Theo Bouwman
@theobouwman
I need my authorizer func to be able to access google services to validate a firebase jwt. how can I congifure this?
1 reply
Evan Furman
@evfurman
Is there a way to force chalice to package for a certain version of terraform? The reason I ask, is because when I run chalice package --stage dev --pkg-format terraform /tmp/pkg/, the created json file is in TF 0.11.x format with variables like "${variable}"
Ezequiel Gioia
@eze1981_gitlab

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?

kraj007
@kraj007
@malaney i am also getting the same issue while chalice deploy command. this is strange as it works in one of lower environment but failing in higher environemnts. Have you got the solution?
Malaney J. Hill
@malaney
@kraj007 upgrading to the latest version of chalice seemed to fix this issue in my case.
1 reply
Manuel Gomes
@manuelgomes
I am trying to build a function that uses spacy, and use the layers provided in https://github.com/keithrozario/Klayers to do so. I can find spacy just fine, but have no idea where the model ends up in the file system so I can load it. Is there a way I can inspect the whole artifact with layers already included, so I can see where I should look? (Or has anyone done successful chalice/spacy stuff some other way?)
Scott Crosby
@iscooter
We have a slack bot running now using Gunicorn and https://api.slack.com/authentication/verifying-requests-from-slack. I'm moving the bot to AWS API Gateway -> Lambda using Chalice, but the Request class's event_dict header does not include "X-Slack-Signature". Everything I see indicates this is in the raw Lambda event from API Gateway, but all I see are the cloudfront header's. Has anyone figured out how to receive/pass/retrieve the origin headers? Because I'm using the exact same bot configuration in slack that does send this "X-Slack-Signature" in the header to the "basic http listener" I am assuming API Gateway has it - but chalice isn't passing it.
1 reply
Scott Crosby
@iscooter

@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.

The idea here is to let chalice dynamically generate the swagger, so that part of chalice is still useful for deploying new routes dynamically.
yevheniidehtiar
@yevheniidehtiar

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

n-mk
@n-mk
Hello everyone. I am trying to use Bitbucket Pipelines to deploy chalice. This is my bitbucket pipeline: https://pastebin.com/raw/nBf9b3VU - But i keep getting this error: https://i.imgur.com/UpH2KFn.png - And i am stuck. I cannot convert to utf8 because it produces chinese letters and using "chalice deploy" on my Win11 works fine. What am i doing wrong?
Brian Schlatter
@schlatte
Anyone seen this problem before when executing a chalice build...?
python: 3.9.11
chalice: 1.27.0
+ /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'
3 replies
Evgeny Kovalchuk
@Senpos
Hi! How do I delete all the resources Chalice created if I no longer have a deployment package / project?
I downloaded the deployment package from the AWS lambda, recreated a project with the same name and stages, but chalice delete does nothing. :(
How can I link my newly created project to the existing resources, so I could then delete them? :-)
2 replies
Andy Challis
@ghandic
Is this a project still being actively maintained? Looks like there’s a lot of old prs and unresolved issues… trying to decide if should go with this or other solutions…
Mostafa Shahverdy
@shahverd
Hi, Can anyone help me find a practical way to create unit tests with IAM bases auth? Thanks