EC2 中仿生主机的 apt 配置

EC2 中仿生主机的 apt 配置

我们在 S3 存储桶中托管了一个 apt 存储库,我们使用它来将包交付给 EC2 中的工作负载。在 xenial 上,我们没有遇到任何问题,但是在 bionic 上使用相同的配置时,我们现在收到 HTTP 403(权限被拒绝)。

我已经检查过,这不是 IAM 配置文件,而是正确的存储桶,ETC

该错误具体如下所示:

 apt-get update
Hit:1 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease            
Hit:3 http://eu-central-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease          
Err:4 http://<my bucket>.s3-website.eu-central-1.amazonaws.com bionic InRelease                                                        
  403  Forbidden [IP: <redacted>]
Hit:5 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease                                                                                 
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                     
Reading package lists... Done                      
E: Failed to fetch http://<my bucket>.s3-website.eu-central-1.amazonaws.com/dists/bionic/InRelease  403  Forbidden [IP: <redacted>]
E: The repository 'http://<my bucket>.s3-website.eu-central-1.amazonaws.com bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

source.list文件如下所示:

deb http://<my bucket>.s3-website.eu-central-1.amazonaws.com/ bionic main

我需要进行哪些配置更改才能允许我的 EC2 实例读取 apt 存储库?

谢谢

答案1

[allow-insecure=yes]repo 配置行上的选项解决了这个问题

相关内容