Skip to content

error while running the aws lambda funtcion #10

@sarce666

Description

@sarce666

hello
i deploy the serverless app in aws
when it runs i got this error :

[ERROR] Exception: 400 Client Error: Bad Request for url: https://api.jumpcloud.com/insights/directory/v1/events
Traceback (most recent call last):
  File "/var/task/get-jcdirectoryinsights.py", line 68, in jc_directoryinsights
    raise Exception(e)

it looks like the http post to the api is not set properly
if i do curl -X POST https://api.jumpcloud.com/insights/directory/v1/events
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'x-api-key: api-key-here'
-d '{
"service": ["all"],
"start_time": "2021-12-14T01:00:00Z",
"end_time": "2021-12-14T18:00:00Z"
}'

it works fine

thanks for the help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions