https://pulumi.com logo
b

bland-lamp-97030

09/14/2018, 12:18 PM
in that example the /cake/events endpoint is fine, but the /cake/command is not showing up
w

white-balloon-205

09/14/2018, 2:12 PM
@bland-lamp-97030 I tried out your example locally - and I can't reproduce the problem myself. I deployed the program as is, and could hit both endpoints:
Copy code
luke:~/dd/pulumidemos/foobarbaz
$ curl -X POST <https://g23lapvyg7.execute-api.us-east-1.amazonaws.com/stage/cake/events>
{"message": "Internal server error"}
luke:~/dd/pulumidemos/foobarbaz
$ curl -X POST <https://g23lapvyg7.execute-api.us-east-1.amazonaws.com/stage/cake/command>
Incorrect token
Then I removed one route, updated, and it 404'd, then added it back, updated, and saw the same as above again. Do you have any more details on steps you take that lead to you not seeing the updates correctly create the routes? If you look at the project at app.pulumi.com - do you see resources corresponding to both Lambda functions? If you go to the API Gateway created by this in the AWS console, does it have the expected routes? Also - which version of the
@pulumi
dependencies are you using? I was on latest of everything for my test above.
b

bland-lamp-97030

09/14/2018, 2:29 PM
Nope - only the first lambda is displaying within the resources and the api gateway. Package versions are listed in https://github.com/jarshwah/cakebot/blob/master/package.json
I did create the first resource, deployed, then created a second resource and deployed
w

white-balloon-205

09/14/2018, 4:51 PM
I tried the exact versions in your package.json as well - and I still can't trigger this. Is it possible you are not running
tsc
or
npm run build
? (Note that these are no longer necessary, but to avoid needing them, you would need to change your
package.json
to remove these lines: https://github.com/jarshwah/cakebot/blob/master/package.json#L3-L7)
🚀 1
b

bland-lamp-97030

09/15/2018, 3:18 AM
That was indeed the problem - I wasn't running a build step, assumed pulumi was doing it, and that's the package.json that pulumi created
thank you 🙂