refined-bear-62276
11/25/2020, 1:05 PMconst endpoint = new awsx.apigateway.API(`service-api`, {
routes: [
// Serve static files from the `www` folder (using AWS S3)
{
path: "/",
localPath: "www",
},
// Serve a simple REST API on `GET /name` (using AWS Lambda)
{
path: "/start",
method: "GET",
eventHandler: async (event) => {
try {
const ec2 = new aws.sdk.EC2();
const myInstance = await server.id.get();
const params = {
InstanceIds: [myInstance],
};
...
brave-planet-10645
11/25/2020, 2:27 PMrefined-bear-62276
11/25/2020, 2:33 PM