Problem when connect to jdbc

1

Hi everyone,
I have a trouble when conncet to mysql in ec2. The problem is I don't know IAM role in this case should include which roles? Can someone suggest me? Everytime I test the new role I have this problem show up

ERROR : At least one security group must open all ingress ports.To limit traffic, the source security group in your inbound rule can be restricted to the same security group (Service: AWSGlueJobExecutor; Status Code: 400; Error Code: InvalidInputException;

I appreciate all of your answer
Thang

질문됨 5년 전3449회 조회
4개 답변
0

Try the following:

in IAM console, create a role with the following policies:

AmazonRDSReadOnlyAccess (or full access if you need to write to the db)
AWSGlueServiceRole
AWSGlueConsoleFullAccess
AmazonS3FullAccess
AmazonEC2FullAccess (this might not be necessary)

This should solve the IAM role problem.

As for the security group, you need to have a self referenced security group. So create a new security group with a rule as follows:

Type = All TCP
Protocol = TCP
Port Range = 0 - 65535
Source = *
Description = whatever you want (e.g. self-reference rule)

You put the security group ID (e.g. sg-096f6b7f4f2692t61) of the security group itself.

Note: not sure you immediately have the security group ID at the time of the creation. If not, when creating the security group add a All TCP rule with your IP as source, then once created, add the above-mentioned rule.

Now if you use that role and that security group in your Glue connection it should work.

답변함 5년 전
0

Hi fabioSama,
I have changed security group like you said, but right now I still get this error when I run my crawler with IAM console. Sorry for reply too late

ERROR : At least one security group must open all ingress ports.To limit traffic, the source security group in your inbound rule can be restricted to the same security group
(Service: AWSGlueJobExecutor; Status Code: 400; Error Code: InvalidInputException; ...)

답변함 5년 전
0

Find the way to correc this. First creat a Nat gateway and connect it with your rout table then it will work perfectly

답변함 5년 전
0

Apparently you need a NAT Gateway if "your job needs to access both VPC resources and the public internet, the VPC needs to have a Network Address Translation (NAT) gateway inside the VPC."

https://docs.aws.amazon.com/glue/latest/dg/start-connecting.html

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠