quiet-translator-27586
05/20/2021, 2:14 PMimport * as pulumi from "@pulumi/pulumi";
import * as awsx from "@pulumi/awsx";
// Create a load balancer to listen for requests and route them to the container.
const listener = new awsx.elasticloadbalancingv2.NetworkListener("bff-meds", { port: 8888 });
// Define the service, building and publishing our "./app/Dockerfile", and using the load balancer.
const service = new awsx.ecs.FargateService("bff-meds", {
desiredCount: 2,
taskDefinitionArgs: {
containers: {
nginx: {
image: awsx.ecs.Image.fromPath("bff-meds", "./app"),
memory: 512,
portMappings: [listener],
},
},
},
});
// Export the URL so we can easily access it.
export const frontendURL = pulumi.interpolate `http://${listener.endpoint.hostname}/`;
crooked-wolf-21506
05/20/2021, 5:40 PMservice.service.iamRole
as an Output<string>
for a role arn, but not sure yet how to translate that to a role name needed for PolicyAttachmentsawsx.apigateway.API
is to use an aws.lambda.CallbackFunction
to pass in a role that can be created with any Policy / Permissions I needquiet-translator-27586
05/20/2021, 8:07 PM