Skip to content
Discussion options

You must be logged in to vote

Thanks @peterwoodworth for response. My problem was that my fargate service could not connect to database . But after so much searching I manage to solve that using security groups like below.

 const fargateSecurityGroup = new ec2.SecurityGroup(this, `fargate-${stage}-security-group`, {
            vpc: vpc,
            allowAllOutbound: true
        })

const dbSecurityGroup = new ec2.SecurityGroup(this, `db-security-group-${stage}`, {
            vpc: vpc, // use the vpc created above
            allowAllOutbound: true, // allow outbound traffic to anywhere
        })

 const dbPort = 5432
        const appPort = 7373
        const redisPort = 6379

        // allow inbound traffic from…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@peterwoodworth
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by kateile
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants