Questions tagged [chalice]

Chalice is a microframework for writing serverless apps in python. It allows you to quickly create and deploy applications that use AWS Lambda.

Chalice is a Python Serverless Microframework for AWS (Amazon Web Services). Chalice is maintained by AWS, the code is available on GitHub at https://github.com/aws/chalice.

Chalice allows to quickly create and deploy applications that use Amazon API Gateway and AWS Lambda. It provides:

  • A command line tool for creating, deploying, and managing your app
  • A familiar and easy to use API for declaring views in python code
  • Automatic IAM policy generation
153 questions
2
votes
1 answer

Lambda timeout config get reset to 1 on deploying using chalice

I am writing a scheduler using Chalice Event Sources (Cron class). I've deployed the code and set the lambda timeout settings in AWS console to 8 mins. But whenever I deploy new changes using command chalice deploy --stage dev the timeout gets reset…
2
votes
1 answer

AWS Chalice: Reading lambda evironment variables in Python

I need to access environment variables I created in AWS Lambda from my Chalice Python code but I am unable to find examples that make sense. Thoughts? I am using Python 3.6.
Not a machine
  • 508
  • 1
  • 5
  • 21
2
votes
1 answer

Custom Authorizer not working when used with AWS Chalice

I am using AWS Custom Authorizer to secure lambda function. I am not able to use the custom authorizer because of some configurational issues. when I tried attaching the authorizer from API Gateway Console, it is working fine. When the authorizer is…
2
votes
0 answers

AWS Chalice - Send a File as Response

I currently have an API setup in the following way. @app.route('/', cors=cors_config, methods=['GET']) def index(): request = app.current_request file_name = "orders.csv" file_path = '/tmp/{}_{}'.format("Life", file_name) with…
Mehran
  • 1,264
  • 10
  • 27
2
votes
2 answers

How to install a pip module from its master branch on github?

I've started using the Python Chalice framework and I found out I need a bugfix that was merged less than 24 hours ago into the framework's master branch, through this PR: https://github.com/aws/chalice/pull/1116 My experience with Python modules is…
Alex R
  • 11,364
  • 15
  • 100
  • 180
2
votes
1 answer

Test a lambda that is using chalice with moto?

I want to test my lambda in local using boto3, moto, pytest. This lambda is using chalice. When I call the function I try to insert a fake event to make it run but it still missing the context object. If someone know how to test it the cleanest way…
Edwyn
  • 31
  • 2
2
votes
2 answers

What is best practice to have client upload image to S3 bucket via Chalice?

I am using the Chalice framework to create an API service. My users need to upload an image and then I need to save the image to an s3 bucket. How should the user upload the image to my endpoint and what should my endpoint do once it receives…
Reed Jessen
  • 141
  • 1
  • 12
1
vote
2 answers

Using AWS CDK & Chalice cdk construct received duplicated lambdas in synthed sam template

on project we had single Chalice project for the whole API + pure lambdas (cloudwatch events, triggers etc) and as the project had grown, lambdas generated by project became bigger and bigger. We decided to split it into several chalice project that…
wteviakh
  • 11
  • 2
1
vote
0 answers

peewee problem: No module named 'playhouse' when deploying using AWS Chalice

I am working on an AWS Chalice project, and I chose peewee as the ORM for the DB we have. When I run things locally with chalice local I can run my api with no problem, I'm able to CRUD normally. When I deploy my microservice using chalice deploy…
bitfede
  • 31
  • 5
1
vote
1 answer

How to make an asynchronous API call to a Chalice app?

I need a user-request from a web app to call an AWS Chalice endpoint which triggers a long-running job. I can't let the user's browser wait for a response. Chalice creates a REST API in API Gateway automatically, so this should be possible as it's…
1
vote
0 answers

Where exactly is AWS Websocket API running and how can it utilize lambda functions?

Reading https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html I am confused. Where exactly the WSS is being hosted and where is the processing happening? In API Gateway you can create a WebSocket API as a…
1
vote
1 answer

Is there a way to get chrome driver to work on AWS lambda?

I'm trying to get a simple web scraper to run-in AWS lambda but I'm facing a blocker where the chromedriver I'm using which is the latest version exists with the following error selenium.common.exceptions.WebDriverException: Message: Service…
E_K
  • 2,159
  • 23
  • 39
1
vote
1 answer

How to support for common RESTful HTTP response codes in AWS Chalice+API Gateway?

I want to handle 401, 500 error with custom response. Flask provides a nice way, @app.errorhandler(401) Is there any similar way for Chalice? I changed the Gateway Response from API Gateway via console and everytime I deploy my chalice app, I need…
1
vote
0 answers

How to create a global counter variable inside a chalice webhook

I am trying to create a variable that I can retrieve outside of the function counts every time a chalice webhook alert is triggered. I cannot figure out how to get the variable out of the function. Here is my code. Thank you! from chalice import…
1
vote
0 answers

How to access secret manager with boto3 and rds-data

In a chalice route, I'm using boto3 to execute queries against my RDS Aurora Serverless DB cluster. This works as expected locally ($ chalice local) but when deployed on Lamdba I receive the error: An error occurred (BadRequestException) when…
1 2
3
10 11