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
1
vote
1 answer

Use AWS Chalice to generate PDF

I am looking for creating internal APIs for me that would generate pdfs as API call and use chalice to deploy it as serverless. So far I have code that I am stuck with 500 error that I can not debug: from chalice import Chalice, Response from…
bensiu
  • 24,660
  • 56
  • 77
  • 117
0
votes
0 answers

import chalice could not be resolved

im trying to create a trading bot and i got stuck with this problem. problem: Import "chalice" could not be resolved Code: from chalice import Chalice app = Chalice(app_name='trading-bot') @app.route('/', methods=['POST']) def…
0
votes
1 answer

Aws lambda unzipped size error - aws chalice

I am getting the following error from aws chalice, when i try to deploy the lambda function An error occurred (InvalidParameterValueException) when calling the UpdateFunctionCode operation: Unzipped size must be smaller than 93963569 bytes I…
0
votes
1 answer

AWS Lambda Chalice app not receiving request payload

I have a small lambda function that I am creating with AWS Chalice in Python. When testing locally all works as intended and my test request works perfectly. However when running chalice deploy and then testing the same request to the hosted API I…
0
votes
0 answers

Sign-in/sign-up with Chalice and Cognito

Based on the homepage example , i wish to extend and use the sign-in/ sign-up features so i can add middleware for authorized from chalice import CognitoUserPoolAuthorizer authorizer = CognitoUserPoolAuthorizer( 'MyPool',…
Bao Tran
  • 618
  • 4
  • 15
0
votes
0 answers

AWS Lambda Function with Chalice not handling SQS messages

I have a lambda function which is implemented with Chalice and I am trying to process SQS messages with it. The code is implemented based on this documentation: https://aws.github.io/chalice/api.html#Chalice.on_sqs_message app.py app =…
Valip
  • 4,440
  • 19
  • 79
  • 150
0
votes
1 answer

Can't access s3 file from chalice local test server

Im trying to change S3 file's metadata from python, and test with chalice server locally (need the chalice for other things). When running (without chalice server): # change file metadata in s3: s3 = boto3.resource('s3') s3_object =…
Idan Rotbart
  • 93
  • 1
  • 5
0
votes
0 answers

Using AWS Chalice to deploy with large dependencies results in connection timeout

I am trying to use AWS Chalice to upload my Python application to a Lambda function. I need to use a number of dependencies that will exceed the 50MB limit for a Lambda app. I think I can overcome this limit by using Lambda layers for each…
Matthew Reid
  • 332
  • 2
  • 9
0
votes
1 answer

Env variables set in GitHub Actions workflow not accessible in AWS lambda project

I have a Chalice (AWS lambda Python framework) project the following CI/CD GitHub Action workflow: name: Production Workflow on: push: branches: - "main" env: REPO: ${{ github.repository }} GITHUB_REF_NAME: ${{ github.ref_name }} …
bolino
  • 867
  • 1
  • 10
  • 27
0
votes
0 answers

favicon not displayed with AWS chalice

HTML code of loading favicon is delow. Server side script return favicon file is below. @app.route('/favicon.ico') def faviconindex(): with open('chalicelib/static/images/favicon.ico', 'rb')…
stone
  • 11
  • 3
0
votes
0 answers

AWS chalice error: All content_types must be consistent in their binary support

we have been given a project in chalice that we are debuging and trying to analyze, the client said that the application has been running or deployed in production but once we tried to build/deploy the chalice app, we are getting the error File…
user2300947
  • 450
  • 4
  • 14
0
votes
1 answer

using localstack AWS how can i listen to SNS event in chalice

i have a localstack setup and i can succesfuly publish SNS from my chalice application by poiting the endpoint url like such _sns_topic = session.resource('sns', endpoint_url='http://localhost:4566') however one of our endpoints needs to listen to…
user2300947
  • 450
  • 4
  • 14
0
votes
0 answers

Can not import app.log from chalicelib directory

I'm using chalice framework for writing API. This is my directory structure. app.py chalicelib service.py requirements.txt app.py content app = Chalice(app_name='api-sample') @app.route('/health') def index(): app.log.info('hello') …
0
votes
1 answer

chalice-cognito-auth obtained id_token but still getting "User is not authorized"

Try to use https://pypi.org/project/chalice-cognito-auth/ I was able to get a json response like: {"id_token":"eyJra...sda", "refresh_token":"eyJjd...", "access_token":"eyJraWQiO...", "token_type":"Bearer"} But when I try to use it like curl -H…
Mzq
  • 1,796
  • 4
  • 30
  • 65
0
votes
1 answer

Chalice AWS Eventbridge

How do i create handler functions (lambdas) that trigger on custom events in a EventBridge event when using AWS Chalice ? https://aws.github.io/chalice/index.html Docs say they support Cloudwatch events. AWS docs say cloudwatch events is kinda the…