简体   繁体   English

文件从 ec2 复制到 aws 中的 s3 存储桶端口

[英]files copy from ec2 to s3 bucket port in aws

I would like to copy files from My ec2 instance to s3 bucket, I didn't open the port,protocol of ec2 security group.我想将文件从我的 ec2 实例复制到 s3 存储桶,我没有打开 ec2 安全组的端口和协议。 Still I am able to copy file from Ec2 to s3, how does that happens?我仍然可以将文件从 Ec2 复制到 s3,这是怎么发生的? on which port, protocol does traffic flow?流量在哪个端口、协议上流动?

By default, the security group allows all outbound traffic which includes the s3 traffic(HTTPS) as well.默认情况下,安全组允许所有出站流量,包括 s3 流量(HTTPS)。 You can disable this, but by doing this you are disabling all outbound HTTPS connections and your machine won't be able to communicate even for software/os update as well.您可以禁用此功能,但通过这样做,您将禁用所有出站 HTTPS 连接,并且您的机器即使对于软件/操作系统更新也将无法进行通信。

I understood that you are trying to find the CIDR for S3 service.我了解到您正在尝试查找 S3 服务的 CIDR。 For that you can use the following command为此,您可以使用以下命令

curl https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="S3") | .ip_prefix'

this will list all the IPv4 addresses used by AWS s3.这将列出 AWS s3 使用的所有 IPv4 地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM