Score:0

Is it impossible to access rds and elasticache redis in AWS fargate only by setting a role?

ca flag

I tried to access the aws service rds and elasticache redis through fargate's task role.

I connected the full access of the service to the task role, but it was not connected, so I allowed the subnet with the security group setting, and the connection was possible.

Is it possible to access only after setting the original role and security group?

Or did I not set the role properly?

Score:0
ma flag

The permissions in the task role gives access to the AWS API, which would give your task the ability to do things like create new RDS or ElastiCache servers. Those IAM permissions do not give it access to connect to RDS or ElastiCache servers, and adding those permissions certainly don't do anything at the network level to open up ports in your database server's firewalls.

To connect to your RDS server you need to make a network connection with a database driver (PostgreSQL, MySQL, whatever RDBMS you selected) on that database server's network port. Similarly to connect to your ElastiCache server you have to use a Redis client to make a connection on the port Redis is listening on. Making those connections to your databases do not use the task IAM role at all, because they aren't doing anything with the AWS API, they are making direct database network connections.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.