Search code examples
amazon-web-servicesaws-security-groupaws-fargate

How to add a Fargate Service to Inbound Security Rules?


I have a Fargate Service running in AWS. I use it to run multiple tasks. Some of the tasks connect to an RDS database to query the database.

How can I add the Fargate Service to my inboard rules of a Security Group for the RDS database? - Is there a way to associate an Elastic IP with the Fargate Cluster?


Solution

  • Might have misunderstood something here... But the ECS allows you specify a security group at the service level.

    Go to https://docs.aws.amazon.com/cli/latest/reference/ecs/create-service.html And search for the --network-configuration parameter

    So surely you just need to set the source on your inbound rule of the RDS security group to be that security group ID?