Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 22:39
    michaeldimchuk edited #1566
  • 21:35
    michaeldimchuk opened #1566
  • 21:04
    czieglerAC opened #1565
  • 19:22
    davidolmo commented #1497
  • 19:20
    davidolmo commented #1497
  • 17:35
    jamesls synchronize #1556
  • 17:30
    jamesls opened #1564
  • 16:11
    jamesls labeled #1563
  • 16:11
    jamesls commented #1563
  • Oct 27 20:57
    y0m1g commented #1208
  • Oct 27 19:05
    renecouto commented #967
  • Oct 27 18:04
    brandold commented #796
  • Oct 27 04:41
    ricky-sb commented #796
  • Oct 27 03:54
    aeresov opened #1563
  • Oct 26 21:25
    no-response[bot] closed #1558
  • Oct 26 21:25
    no-response[bot] commented #1558
  • Oct 26 19:54
    renecouto commented #967
  • Oct 26 15:20

    aws-sdk-python-automation on gh-pages

    Updating generated documentation (compare)

  • Oct 26 15:18

    aws-sdk-python-automation on 1.21.3

    (compare)

  • Oct 26 15:18

    aws-sdk-python-automation on master

    Bumping version to 1.21.3 (compare)

chetanvalagit
@chetanvalagit
Awesome. Do we have some example for the same. Example will be very helpful
Kapil Thangavelu
@kapilt
its in the docs.. here's a more involved example the workshop https://chalice-workshop.readthedocs.io/en/latest/media-query/04-s3-event.html
2 replies
Jon Beilke
@jrbeilke
Any chance we could get the PR for Terraform module path merged soon? Seems like it's ready to go and would really help being able to include other Terraform config along with Chalice - aws/chalice#1387
KamilahCar
@KamilahCar
Hello. I'm trying to get through the chalice tutorial projects and I'm stuck on the Request Metadata section. I've created my route for retrieving "my object". The issue is I'm getting an error (stdin is not a tty) when I run the following command: echo '{"foo": "bar"}' | http PUT https://<myendpoint>/api/objects/mykey. I am in my helloworld directory when I run this command.
Can anyone help me out or give further insight? I've already looked into the error (stdin is not a tty) and what that means.
1 reply
Rod Whisnant
@rodwhis
Hi, I'm trying to get an image response endpoint working with Chalice. It works fine locally but, deploying to AWS API Gateway I'm not getting the expected binary data in a browser. It works if I add an "Accept: image/png" in the header however. I've tried suggestions from this post aws/chalice#1095 but, to no avail. Thoughts?
1 reply
Casey Key
@caseyjkey
Hi, I am an intern for AWS's Public Sector team. We want to use Chalice for our project, but we don't know if it's approved for high-side/C2S regions. Any info on this?
Casey Key
@caseyjkey
my Amazon alias is @keycasey please contact me if you have word on using this for high-side projects
Brian Schlatter
@schlatte
Has anyone attempted to use reserved_concurrency on a on_sqs_message decorated lambda function?
We were attempting to use reserved_concurrency as a rate limiter (setting the value to 1). The idea, only spin up lambda to consume from the queue and trickle through all the messages. However, we've run into some unexpected behavior.
Brian Schlatter
@schlatte
If the queue gets a burst of 30 messages, they all immediately get sent to Messages In Flight. Our lambda is configured to process 1 message at a time. So, during the Message Visibility Timeout (lets say 15min), only 1 of 30 messages get processed?!
Curious, if anyone else has experienced this problem and found a workaround
RahulChowdaryN
@RahulChowdaryN
Hey Guys
I would like use apigateway lambda authorizer. How to integrate chalice with api gateway lambda authorizer ? is this possible ?
RahulChowdaryN
@RahulChowdaryN
any suggestions would be very helpful ?
Jan Friebertshäuser
@FreebeJan
Hello, I am new to chalice. Is possible to use chalice with HTTP APIs?
5 replies
Jon Beilke
@jrbeilke
No support for the new HTTP APIs yet in Chalice, but there is an open feature request to add it: aws/chalice#1321
RahulChowdaryN
@RahulChowdaryN
Hello, I'm using custom authorizers in chalice. when i try to access from client, it's giving me a cors issue.
Access to XMLHttpRequest at 'https://---------amazonaws.com/api/custom_cors' from origin 'https://www.google.com' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
how do I solve this problem ? any pointers will be helpful. also, i need to access from multiple domains
Barnaby Gray
@barnybug
Hi - is it possible to use a queue name specific to the stage in @app.on_sqs_message(...)? Use case is we have different queue names per stage.
5 replies
tgampiyush
@tgampiyush

Hi @team I am using chalice to deploy my lambda and fetching the env variable but its not able to set the env variable despite I am adding them in config.json file.
This is my config.json -

{
  "version": "2.0",
  "app_name": "CMSFilterApp",
  "stages": {
    "dev": {
      "api_gateway_stage": "api",
      "environment_variables": {
        "OUTPUT_STREAM": "filtered_cmsfeed",
      }
    }
  }
}

This is where I am fetching -
`output_stream_name = environ.get('OUTPUT_STREAM', False)

if environ.get('OUTPUT_STREAM', False):
raise EnvironmentError('OUTPUT_STREAM must be set before anything else!')
else:
print(output_stream_name)
`

its giving me error while doing chalice package . -

  File "/home/piyush/.local/lib/python3.6/site-packages/chalice/cli/factory.py", line 273, in load_chalice_app
    app = importlib.import_module('app')
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/piyush/Downloads/lambda-arc-events-filter/app.py", line 33, in <module>
    raise EnvironmentError('OUTPUT_STREAM must be set before anything else!')
OSError: OUTPUT_STREAM must be set before anything else!
1 reply
Josh Frantz
@tehreet_twitter
Question! Trying to get something simple stood up as a proof of concept, but i'm running into an issue. I have a settings.yml file i want to use to configure some options, but Chalice isn't creating the deployment package with that file, so the lambda invoked gives an error: [Errno 2] No such file or directory: 'settings.yml'. Deploying it locally works great, the file is there. But when i run deploy and invoke the lambda, it says the settings file could not be found. I did a list on the directory via the code in the lambda, and the settings file is indeed not there. Anything i'm missing?
2 replies
Hasan Rizvi
@hizvi
is there a way to use chalice blueprints for websockets api?
AttributeError: 'Blueprint' object has no attribute 'websocket_api'
Teodor Cimpoesu
@cteodor

Hey all, how can we call a pure lambda from an ApiHandler?
I have
@app.lambda_function()
def target_helper(event, context):
[... logic...]

@app.route("/target")
def target():
how can I invoke target_helper from here?
via boto3 I need to know the generated lambda function name

Mike Monaghan
@mrmikemon
Any tips for getting 'custom domain names' to work. using chalice deploy its not adding the custom domain support on api gateway. The command line doesn't mention the `custom domain name in the deploy output. Any suggestions?
Mike Monaghan
@mrmikemon
Ahh. Found it was running with 1.14.1 and not latest 1.17
Michael Robellard
@subssn21_gitlab
I saw that Automatic Layers finally got released. I am super excited to try it out. Thanks for all the hard work to make that a reality. My vote for the next most important feature is HTTP APIs.
Michael Robellard
@subssn21_gitlab
Tried using automatic layers, but it is unable to import 3rd party library specified in requirements.txt. Verified that the file is in the managed_layer.zip however when I call the API gateway method I get an error in in the API Gateway cloudwatch logs:
(d816fe12-5308-4d17-9cc5-cabe7b16a89e) Endpoint response body before transformations:
{
"errorMessage": "Unable to import module 'app': No module named 'epsagon'",
"errorType": "Runtime.ImportModuleError"
}
James Saryerwinnie
@jamesls
I'm taking a look at this, not sure why this isn't working.
James Saryerwinnie
@jamesls
@subssn21_gitlab I tried to repro it but I wasn't able to. I added the steps I tried here: https://github.com/aws/chalice/issues/1493#issuecomment-678374077. Let me know if there's any other details you can share.
kristus123
@kristus123_gitlab

Hi there. I have a question regarding setting VPC configuration

are there any examples out there on how to create a yaml-template. Like how do i actually --merge a template while packaging.

lambda:
  Type: AWS::Serverless::Function
  Properties:
    ...
    VpcConfig:
      SecurityGroupIds:
        - !Ref SecurityGroup
      SubnetIds:
        - Fn::ImportValue: CoreVPC:PrivateSubnetAz1
        - Fn::ImportValue: CoreVPC:PrivateSubnetAz2

  Rollname:
    Type: AWS::IAM::Role
    Properties:
      ...
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AmazonVPCFullAccess
        ...

Snippet from an old lambda that has the vpc settings i am interested in

kristus123
@kristus123_gitlab

there is not a single place that describes what this does

--capabilities CAPABILITY_IAM

Found documentation for --capabilities
Yogesh Ingale
@yogingale

Hi @jamesls, I started working on aws/chalice#1414 feature. I want to know your thoughts on below question.

What is expected when both suffix and prefix are provided - Create an individual trigger for each prefix/suffix or Create a pair of prefix/suffix till their length matches and then create an individual trigger (Implemented here )?

@app.on_s3_event(bucket=BUCKET_NAME, prefix=["images/", "thumbnails/"], suffix=[".jpg", ".png", ".svg"])
def function_name(event: S3Event):
       pass

Note: Current implementation creates a pair of events with both prefix and suffix.

Mauro Spivak
@mspivak
Hi there, I'm new to chalice and I'm struggling with a tiny demo app I'm trying to deploy. Error is "The write operation timed out". I tried chalice --debug deploy It retries several times but it never works.
kristus123
@kristus123_gitlab
@mspivak Maybe send the code you have ? Maybe your environment is set up wrong as well
Rafał Mituła
@rmitula
Hi, I wonder if there is an option to commonly name all Chalice generated resource names with some prefix like 'PROD-ChaliceAppPrefix-FuntionName'? FYI I'm using Terraform deployment option.
kristus123
@kristus123_gitlab
why do i get this error ?
[ERROR] KeyError: 'version'
Traceback (most recent call last):
File "/var/task/chalice/app.py", line 1458, in call
event_obj = self.event_class(event, context)
File "/var/task/chalice/app.py", line 1486, in init
self._extract_attributes(event_dict)
File "/var/task/chalice/app.py", line 1497, in _extract_attributes
self.version = event_dict['version']
kristus123
@kristus123_gitlab
i get it a lot in my sqs method in chalice
chetan korde
@chetan_korde_twitter
Hello, query is if successive chalice deploy will only upload the diff(changes in app.py) or the entire package(including dependency packages) to aws?
yazaksu
@yazaksu
hello everyone. is there any plans to implement Provisioned Concurrency ?
is there a feature request for this?
yazaksu
@yazaksu
my question is regarding this feature request aws/chalice#1322
mowliv
@mowliv
Hi guys - I sometimes am in a rural area where upload speeds are slow enough that chalice deploy times out and I cannot upload. Before using chalice, I got around this by uploading first to S3. Is there any option for doing that with chalice? The other nice thing S3 upload provides is a progress bar (a non issue with fast upload, I know).
Nirali Mistry
@niralimistry
Hello I am trying to run aws chalice app with python. I am getting error "Missing authentication token". Does anyone came across such error ? Thanks for the help
image.png
Kovalchuk Evgeny
@Senpos

Hey there! Is stacking decorators on top of each other allowed? For example, I want my function to be invoked by both HTTP-request (route) and periodically (schedule).
Can I just do:

@app.route(...)
@app.schedule(...)
def my_function(): ...

Or should I create a separate handler for each of those?