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
13
votes
1 answer

Uploading file to AWS S3 through Chalice API call

I'm trying to upload a file to my S3 bucket through Chalice (I'm playing around with it currently, still new to this). However, I can't seem to get it right. I have AWS setup correctly, doing the tutorial successfully returns me some messages. Then…
JChao
  • 2,178
  • 5
  • 35
  • 65
7
votes
2 answers

pip install urllib3 hanging on "Caching due to etag"

Pip install of urllib3 is hanging on "Caching due to etag". I'm building an AWS chalice project that doesn't let you specify --no-cache-dir, so I need to fix the issue without that command. Any ideas? Using Python 3.6.5 and Pip 10.0.1 in a virtual…
mbrz_0101
  • 85
  • 7
6
votes
1 answer

Error while installing Chalice

I am working with https://github.com/awslabs/chalice for using AWS Lambda, and I faced the following issue while installing using pip install chalice This is the error. Exception: Traceback (most recent call last): File…
5
votes
0 answers

Respond to a client on connect to WebSocket via Chalice framework

I'm currently developing WebSocket microservice using Chalice framework and faced with sudden obstacle with user authentication on connect event. To be more specific: I do not understand how to clearly respond to a client in case he cannot be…
5
votes
1 answer

AWS IAM Policy required for AWS Chalice

What is the IAM role policy required AWS Chalice. There is no official documentation in Github? What are the permissions are required to run AWS Chalice?
Thirumal
  • 8,280
  • 11
  • 53
  • 103
5
votes
1 answer

Why is AWS's Chalice for Python not respecting my virtualenv?

I'm attempting to deploy a chalice application following the tutorial. I'm using a virtualenv with python3.6. My application is dependent on a github repo in the requirements.txt and that repo's requirements.txt depends on several libraries. I can…
mmachenry
  • 1,773
  • 3
  • 22
  • 38
4
votes
1 answer

Boto3 InvalidAccessKeyId in generate_presigned_post

I'm creating an AWS Lambda and API using Python's Chalice library. My AWS Credentials are injected using github workflow aws-actions and its able to chalice deploy. The endpoints are working and it's deploying perfectly to AWS. The problem is: I…
4
votes
2 answers

Cannot access the request json_body when using Chalice

I'm attempting to make a curl request to my python api that is using the AWS package Chalice. When I try to access the app.current_request.json_body a JSON Parse error is thrown. Cannot figure out why this is happening. My JSON is formatted properly…
Nicholas Porter
  • 2,588
  • 2
  • 23
  • 37
4
votes
1 answer

How to access the raw query string (or full URL) in a Chalice (AWS Lambda/API Gateway) app?

I'm using Chalice to build a fairly straightforward API on AWS Lambda & API Gateway. I need a way to get access to the raw query string (i.e foo=bar&abc=123). When accessing the app.current_request.query_params dictionary, it's already been…
robmathers
  • 3,028
  • 1
  • 26
  • 29
4
votes
4 answers

set timeout for chalice functions in general

In the documentation of chalice one can see an example of a configuration of a lambda function on aws provisioned by chalice. The idea is that you can define an app like below: from chalice import Chalice app =…
cantdutchthis
  • 31,949
  • 17
  • 74
  • 114
4
votes
6 answers

Unable to use pyodbc with aws lambda and API Gateway

I am trying to build a AWS Lambda function using APi Gateway which utlizes pyodbc python package. I have followed the steps as mentioned in the documentation. I keep getting the following error Unable to import module 'app': libodbc.so.2: cannot…
Akshay Saxena
  • 65
  • 1
  • 6
4
votes
1 answer

Parsing raw_body from AWS Chalice multipart/form-data http request

I have the following simple AWS Chalice route: @app.route('/submit', methods=['POST'], content_types=['multipart/form-data']) def submit(): request_info = app.current_request.raw_body return request_info I then use a simple form…
Joe Stech
  • 218
  • 5
  • 12
3
votes
0 answers

should i use Factory pattern for sending dynamic mails for more than 50 clients

I am having chalice project and using that i am sending mails to the clients. Every client is associated with an organization. Till now i was using same template for all clients but now i need to make changes in the mail template at organization…
3
votes
1 answer

boto3 ConnectionClosedError python

I am trying to deploy Rest Api with Chalice. When I do chalice deploy. The code worked with chalice local. But it fails in Deployment. I get the following error: Creating deployment package. Updating policy for IAM role: learnChalice-dev Updating…
Darth Vader
  • 881
  • 2
  • 7
  • 24
3
votes
2 answers

What is the chalice @app.schedule syntax for cron events?

I am trying to follow the documentation from https://chalice.readthedocs.io/en/latest/topics/events.html I tried this @app.schedule('0 0 * * ? *') def dataRefresh(event): print(event.to_dict()) and got this…
Alex R
  • 11,364
  • 15
  • 100
  • 180
1
2 3
10 11