如何解决无法使用提供的打包程序模板构建AMI,返回与S3相关的错误
我正在遵循该指南,该指南提供了用于创建AMI https://github.com/scarolan/vault-aws-cf
的打包程序模板问题是我是Packer的新手,看到以下错误:
Build 'amazon-ebs' errored after 5 seconds 898 milliseconds: Couldn't find specified instance profile: NoSuchEntity: Instance Profile Packer-S3-Access cannot be found.
status code: 404,request id: 8c62db59-fdaa-4150-bd43-883415839ce6
==> Wait completed after 5 seconds 898 milliseconds
==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Couldn't find specified instance profile: NoSuchEntity: Instance Profile Packer-S3-Access cannot be found.
我正在尝试通过以下方式构建vault.json:
packer build \ -var 'aws_access_key=<enter-key-here>' \ -var 'aws_secret_key=<enter-key-here>' \ vault.json
我是否在打包程序构建中缺少几个参数,还是需要使用相关的AWS信息编辑打包程序模板文件?
解决方法
从vault.json中我可以看到Packer-S3-Access
是用户定义的输入,然后将其用作打包程序中的iam_instance_profile。
{
"description": "Vault and Consul Client Configuration for Vault.","variables": {
// snip
"inst_profile": "Packer-S3-Access",},"builders": [
{
// snip
"iam_instance_profile": "{{user `inst_profile`}}",
由于是用户输入,因此您尚未在AWS账户中使用该名称定义实例配置文件。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。