Cloud9 - AWS Resources vs AWS Toolkit - API Gateway -> Lambda Testing

0

AWS Toolkit is replacing the old AWS Resources part of Cloud9. I use this to develop Lambda functions invoked via API Gateway, using CloudFormation/SAM templates. With AWS Resources, I can test via "Run API Gateway Local" right in my Cloud9 IDE. From what I can tell, this is not possible with AWS Toolkit, and I would have to test the Lambda directly (w/o mimicking the request as coming from API Gateway). Can anybody tell me how I can accomplish the equivalent of "Run API Gateway Local" with AWS Toolkit? Or is this a great feature that is just being taken away?

Thanks.

2 Antworten
0

Thank you @oyku. I did figure that out. However, there are 3 things about the new AWS Toolkit that are just not good:

  1. It takes about 40s to run a single test (every time)
  2. AWS Toolkit somehow loses credentials pretty often - perhaps every 5 or 10 minutes. This causes any DynamoDB/other AWS requests to fail with security issues.
    • A browser refresh fixes this, but it is extremely annoying.
    • AWS CLI, etc. all continue to work fine. So the issue seems to be specific with AWS Toolkit.
  3. Every time I use AWS Toolkit to run/test, it creates a ~500MB directory in /tmp/aws-toolkit-vscode . If I leave my instance running for a long time, this quickly fills up disk space and I have to manually remove all of these temp files.

Do you have any insight or advice to work around or fix these issues? Thanks!

john_pk
beantwortet vor 2 Jahren
  • were you ever able to get this to run any better?

-1

Hi @john_pk, you can follow "Running and debugging local Amazon API Gateway resources" section in this Running and debugging serverless applications guide. You will need to create a new launch configuration as stated. Please let us know if that doesn't work for you.

AWS
oyku
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen