Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Imposter Doesn't Error but when deployed on AWS lambda it complains about issues. #626

Open
tusharjajodia opened this issue Sep 16, 2024 · 0 comments

Comments

@tusharjajodia
Copy link

I have the following mock config

plugin: rest
resources:
  - path: /air-buzz/oauth/token
    method: POST
    requestHeaders:
      content-type: application/json
    response:
      statusCode: 200
      scriptFile: plugnplay/auth-response.js

and plugnplay/auth-response.js file has following content. Which has some syntax error, ( no closing braces for authResponse object).

var authResponse = {
     "access_token": "thisismyauthorizationvalueforplugnplay",
     "expires_in": 100

respond()
    .withStatusCode(200)
    .withHeader("content-type","application/json")
    .withContent(JSON.stringify(authResponse));

When I run imposter up in local environment. It doesn't complain ( it does complain when I actually only hit the url /air-buzz/oauth/token but doesn't complain in the compile phase or for other urls).

The same code when I am deploying in AWS lambda, it complains at the time compiling while booting).

I wanted to know if there are some settings/configs that I can add in the local Docker Image as well so that whenever I run locally (imposter up) I get all these errors up front.

Other Informations:

  1. I am using imposter-awslambda.zip zip in my AWS lambda.
  2. I am using Docker image outofcoffee/imposter:4.0.3.

Happy to provide more details if needed.
Thanks in Advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant