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

Chalice Deploy hangs and then throws timeouts

I have a very simple chalice app with a scheduler that I want to deploy to aws lambda. Everything worked fine, however suddenly I cannot deploy the chalice app anymore. It hangs on the line Creating lambda function: test-dev-periodic_task for a very…
Lucas
  • 13,679
  • 13
  • 62
  • 94
0
votes
1 answer

Chalice AWS 504

I have a chalice project (1.26.2) which is always exiting with a time out when deployed, chalice local works fine. This is my project structure: This is the code in my app.py: from datetime import datetime from decimal import Decimal import…
Dirk
  • 3,095
  • 4
  • 19
  • 37
0
votes
1 answer

Chalice deploy for S3 event throwing an error

The s3-event source project throwing an error while deploying chalice new-project s3-event-source chalice deploy Error: chalice.deploy.deployer.ChaliceDeploymentError: ERROR - While deploying your chalice application, received the following…
Thirumal
  • 8,280
  • 11
  • 53
  • 103
0
votes
1 answer

How to create a direct integration between an API Gateway and SQS in Python Chalice

I have an app that I am building using Python Chalice and would like to create a direct integration with the REST API gateway and an SQS queue without using a lambda function. My code for the gateway is as follows: @app.route('/',…
kmg92
  • 31
  • 5
0
votes
1 answer

Python Chalice Pure Lambda Function - reference name in separate Cloud Formation Template

I have created a pure python lambda function in python chalice app.py like so: @app.lambda_function('R53CloudformationResourceConflict') def r53_cloudformation_resource_conflict(event, context): logger.info(event) logger.info(context) Now…
Justin S
  • 1,409
  • 4
  • 22
  • 38
0
votes
1 answer

Complex cron with chalice.Cron

I have an AWS Lambda scheduled with chalice cron, in Python. Up until now, it's been @app.schedule(chalice.Cron("0/30", "5-11", "*", "*", "?", "*")) def foo(event): And that works fine; it runs overnight (don't ask why). However, I want to set it…
0
votes
1 answer

Internal Server Error when deploying Chalice (AWS)

I am trying to deploy a simple REST API using Chalice. My basic boilerplate is from chalice import Chalice app = Chalice(app_name='helloworld') @app.route('/') def index(): return {'hello': 'world'} When I call chalice local and run it on…
Nathan Lu
  • 69
  • 5
0
votes
2 answers

HttpOnly cookie setting in local deployment but not remote deployment

I have a local server that successfully sets an HtmlOnly cookie on a local client, but the same code on a remote server is not setting the cookie. The local server is a Chalice server running on http://localhost:8000. The response headers are: { …
v4gil
  • 842
  • 1
  • 10
  • 16
0
votes
1 answer

control chalice IP connection to postgres

I built a small chalice app that is connected to Postgres that does some inserts. In the pg_hba.conf file (the database is on another server) I have allowed only certain IPs to connect. Almost every request from lambda uses a different IP. this is…
0
votes
2 answers

How to print log in pytest using AWS Chalice framework?

How to print log in pytest using AWS Chalice framework? The log prints everything if we use custom logger import logging logger = logging.getLogger() logger.setLevel(logging.DEBUG) Run test with log-level (Working) pytest --log-cli-level=DEBUG If…
Thirumal
  • 8,280
  • 11
  • 53
  • 103
0
votes
1 answer

AWS chalice local works but not chalice deploy

I am pretty new to coding and aws chalice. I tried writing a code that gets messages from trading-view and executes orders depending on the signals. I tested the code locally and everything worked fine, but when I test the Rest API I get the…
test1234
  • 1
  • 1
0
votes
1 answer

Flask Pagination is not working with AWS Chalice

Pagination is not working with AWS chalice, is there any other way to implement pagination? from flask import request @app.route('/hello/{name}') def hello_name(name): page = request.args.get('page', 1, int) print(page) # #…
Thirumal
  • 8,280
  • 11
  • 53
  • 103
0
votes
1 answer

How to configure AWS ALB for a chalice lambda project

I am trying to configure My existing python lambda function which is deployed using chalice. I tried configuring ALB with lambda but it seems ALB is unable to communicate Chalice deployed projects. It seems the Chalice structure that we use for API…
0
votes
1 answer

How can I get AWS Chalice to use pyenv virtualenv python version?

I have a virtual environment create from pyenv virtualenv 3.8.8 raai which is active. When I install and then invoke chalice it is using the system installed python version. How can I get the chalice command to use the pyenv specified/active…
lovelikelando
  • 7,593
  • 6
  • 32
  • 50
0
votes
1 answer

"Endpoint request timed out" with chalice deploy

This code works fine when deployed with 'chalice local' but when I deploy it with 'chalice deploy' and send a post request to the endpoint I am greeted with a status: 504 gateway timeout and message: "Endpoint request timed out". from chalice import…