我遵循本指南,该指南提供了创建AMI的打包器模板https://github.com/scarolan/vault-aws-cf
问题是,我是包装工的新手,看到了以下错误:
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
是一个用户定义的输入,然后用作packer中的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帐户中定义具有该名称的实例配置文件。