Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(parent, id, props) {
super(parent, id, props);
const broadcast = new ecsPatterns.LoadBalancedFargateService(this, 'Broadcast', {
image: ecs.ContainerImage.fromAsset('./app/socket-broadcast'),
publicTasks: true,
cluster: props.cluster,
cpu: 256,
memoryLimitMiB: 512,
desiredCount: 1,
environment: {
REDIS_HOST: props.redis.cluster.attrRedisEndpointAddress,
REDIS_PORT: props.redis.cluster.attrRedisEndpointPort
},
createLogs: true
});
// Grant the broadcast service networking access to Redis
broadcast.service.connections.allowToDefaultPort(props.redis);