简体   繁体   English

试图找到我在 AWS Certificates 上创建的 ssl 证书

[英]trying to find my ssl certificate I created on AWS Certificates

I setup my ec2 instance and got https working for a bit only to realize I need tls 1.2 on default and in order to do that I had to configure my code to instruct it to read my cert file in the code.我设置了我的 ec2 实例并让 https 工作了一点,只是为了意识到我默认需要 tls 1.2,为了做到这一点,我必须配置我的代码以指示它读取代码中的证书文件。 Problem is I don't know which it is as there are 269 files in the directory /etc/ssl/certs.问题是我不知道是哪个,因为目录 /etc/ssl/certs.conf 中有 269 个文件。 I have googled for a couple hours hoping something would tell me where to look to check what file amazon generated for me that it specifically wants.我已经用谷歌搜索了几个小时,希望有什么可以告诉我在哪里可以查看亚马逊为我生成的它特别想要的文件。 Otherwise im shooting in the dark trying pems one at a time.否则,我会在黑暗中拍摄,一次一个。

  secureProtocol: 'TLSv1_2_server_method',
  pfx: fs.readFileSync("/etc/ssl/certs/FILENAME.PEM")
}, app).listen(443);

Help is greatly appreciated.非常感谢帮助。

Please refer EC2 instance details in AWS management console.请参阅 AWS 管理控制台中的 EC2 实例详细信息。

Steps:脚步:

  1. Login to AWS management console and goto EC2 -> Instances.登录 AWS 管理控制台并转到 EC2 -> Instances。
  2. Select the instance to which we need to connect and scroll the description which is present in bottom window which will have EC2 instance details.选择我们需要连接的实例并滚动底部窗口中的描述,其中将包含 EC2 实例的详细信息。
  3. Check for "Key pair name" , this will be the key pair which needs to be used to securely connect to respective EC2 instance.检查“密钥对名称”,这将是用于安全连接到相应 EC2 实例的密钥对。

I assume that you got a certificate on Amazon ACM.我假设您在 Amazon ACM 上获得了证书。

ACM Certificates can be used in, ACM 证书可用于,

  • Elastic Load Balancing弹性负载均衡
  • Amazon CloudFront亚马逊云前线
  • Amazon API Gateway亚马逊 API 网关
  • AWS Elastic Beanstalk AWS 弹性豆茎
  • AWS CloudFormation(for email validation only) AWS CloudFormation(仅用于电子邮件验证)

The certificate issued by ACM cannot be installed directly on an EC2 instance. ACM 颁发的证书不能直接安装在 EC2 实例上。

If you want to install an SSL certificate directly on your EC2 instance, you will need to obtain a SSL certificate through a third-party如果您想直接在 EC2 实例上安装 SSL 证书,则需要通过第三方获取 SSL 证书

Therefore, you cannot find any files related to the certificate issued by ACM inside your EC2 instance.因此,您在 EC2 实例中找不到与 ACM 颁发的证书相关的任何文件。

hope this helps.希望这可以帮助。

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

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