Access Secrets Manager from EC2 without Endpoint

0

I have a ec2 instance (Elastic Beanstalk) that get secrets from the secret manager. For that to work the ec2 as a role with the permission to access the secret, a security group with https permission with the origin and destination of itself and an endpoint to the secrets manager.

Everything works fine but it doesn't work without the endpoint.

My question is, why do I need the endpoint if the ec2 already has public access to the internet?

2 個答案
0

An application running inside an EC2 machine can connect to Secrets Manager using either the public endpoints of Secrets Manager (https://docs.aws.amazon.com/general/latest/gr/asm.html) or using a VPC endpoint to Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/vpc-endpoint-overview.html). If using the VPC endpoint, the traffic goes over the AWS network and not over the public internet.

Security groups are stateful firewalls to ensure access only from relevant IPs, CIDRs or other security groups are allowed on the opened ports only. As the name suggests, that's to protect from unauthorized access.

profile pictureAWS
專家
已回答 2 年前
profile picture
專家
已審閱 5 個月前
0

Thanks for the answer.

I know this. Right now I'm using a VPC endpoint but if I didn't have the endpoint the connection with the secrets manager wouldn't work. Why is that? What is blocking the connection? Is the Internet gateway? Is the router?

I'm using the aws sdk to get the secret.

TP-user
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南