# Error while using aws dynamic host catalog plugin

**URL:** <https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760>\
**Category:** Boundary\
**Created:** [January 25, 2022, 3:43pm UTC](https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760 "2022-01-25T15:43:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![purushothamkdr453](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/purushothamkdr453/32/25368_2.png) [@purushothamkdr453](https://discuss.hashicorp.com/u/purushothamkdr453)\
**Post date:** [January 25, 2022, 3:43pm UTC](https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760/1 "2022-01-25T15:43:26Z")

</div>

Hi All,

I am trying to use aws dynamic host catalog plugin which is here [GitHub - hashicorp/boundary-plugin-host-aws: Boundary Host Plugin (AWS)](https://github.com/hashicorp/boundary-plugin-host-aws). However I am getting an error while using this plugin. executed commands are as below.

**Bounday dev server:**

boundary dev

**Creating Hostcatalog plugin**

boundary host-catalogs create plugin -scope-id p\_1234567890 -plugin-name aws -name “Example Plugin-Based Host Catalog” -description “Description for plugin-based host catalog” -attr disable\_credential\_rotation=true -attr region=us-west-1 -secret access\_key\_id= -secret secret\_access\_key=

**Error**

Error from controller when performing create on plugin-type host catalog

Error information:  
Kind: Internal  
Message: host\_catalogs.(Service).createPluginInRepo: unable to create host catalog: plugin.(Repository).CreateCatalog: in  
scope: p\_1234567890: db.DoTx: plugin.(Repository).CreateCatalog: unknown, unknown: error #0: rpc error: code = Unknown desc = error during  
credential validation: error validating credentials: RequestError: send request failed  
caused by: Post “[https://sts.amazonaws.com/](https://sts.amazonaws.com/)”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)  
Status: 500  
context: Error from controller when performing create on plugin-type host catalog

**Following are the boundary versions used**

Boundary Cli - 0.7.3  
Boundary server - 0.7.3

---

<div class="post-metadata">

**Author:** ![omkensey](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/omkensey/32/40882_2.png) [@omkensey](https://discuss.hashicorp.com/u/omkensey)\
**Post date:** [January 25, 2022, 7:40pm UTC](https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760/2 "2022-01-25T19:40:27Z")

</div>

I see an AWS credential error in there – at first glance it looks like Boundary was not able to use the AWS credentials being used to configure the plugin. My first thought is, is this in a private VPC subnet that can’t access the usual AWS endpoints? If you SSH to an instance in that subnet and `curl -L https://sts.amazonaws.com/` do you get any response at all (even an error?)

---

<div class="post-metadata">

**Author:** ![purushothamkdr453](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/purushothamkdr453/32/25368_2.png) [@purushothamkdr453](https://discuss.hashicorp.com/u/purushothamkdr453)\
**Post date:** [January 26, 2022, 6:50pm UTC](https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760/3 "2022-01-26T18:50:10Z")

</div>

I am getting a different error now.

Error from controller when performing create on plugin-type host catalog

Error information:  
Kind: NotFound  
Message: Resource not found.  
Status: 404  
context: Error from controller when performing create on plugin-type host catalog

---

<div class="post-metadata">

**Author:** ![omkensey](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/omkensey/32/40882_2.png) [@omkensey](https://discuss.hashicorp.com/u/omkensey)\
**Post date:** [January 26, 2022, 7:35pm UTC](https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760/4 "2022-01-26T19:35:20Z")

</div>

Can you copy and paste what you’re doing up to that point? It sounds like maybe the project scope ID you’re giving it doesn’t exist.

---

<div class="post-metadata">

**Author:** ![purushothamkdr453](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/purushothamkdr453/32/25368_2.png) [@purushothamkdr453](https://discuss.hashicorp.com/u/purushothamkdr453)\
**Post date:** [January 27, 2022, 3:49am UTC](https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760/5 "2022-01-27T03:49:17Z")

</div>

Here are the detailed commands/instructions which I had followed.

**Started Boundary in Devmode**

boundary dev

**Created AWS EC2 Instance**

Created aws ec2 t2.micro instance.

\*\*Created IAM Policy \*\*

Iam policy has been created with the following permissions.

{  
“Version”: “2012-10-17”,  
“Statement”: [  
{  
“Action”: [  
“ec2:DescribeInstances”  
],  
“Effect”: “Allow”,  
“Resource”: “\*”  
}  
]  
}

**Created IAM User with the above created policy**

New IAM user(programatic access) has been created by attaching the above created policy.  
Got the Accesskeyid, Secretkeyid.

**Authenticate with boundary**

Authenticated with boundary using the below command.

boundary authenticate password -auth-method-id ampw\_1234567890 -login-name admin -password password

**Error while creating aws hostcatalog plugin**

boundary host-catalogs create plugin -scope-id p\_1234567890 -plugin-name aws -name “Example Plugin-Based Host Catalog” -description “Description for plugin-based host catalog” -attr disable\_credential\_rotation=true -attr region=us-west-1 -secret access\_key\_id=redacted -secret secret\_access\_key=redacted

Error is:

Error from controller when performing create on plugin-type host catalog

Error information:  
Kind: Internal  
Message: host\_catalogs.(Service).createPluginInRepo: unable to create host catalog:  
plugin.(Repository).CreateCatalog: in scope: p\_1234567890: db.DoTx: plugin.(Repository).CreateCatalog: unknown, unknown: error  
#0: rpc error: code = Unknown desc = error during credential validation: error validating credentials: RequestError: send  
request failed  
caused by: Post “[https://sts.amazonaws.com/](https://sts.amazonaws.com/)”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)  
Status: 500  
context: Error from controller when performing create on plugin-type host catalo

---

<div class="post-metadata">

**Author:** ![omkensey](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/omkensey/32/40882_2.png) [@omkensey](https://discuss.hashicorp.com/u/omkensey)\
**Post date:** [January 27, 2022, 4:29pm UTC](https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760/6 "2022-01-27T16:29:55Z")

</div>

Hm. I’m not sure this is why you’re getting the timeout error, but I can at least say you need some additional IAM permissions for your IAM user you create for the plugin. You need an IAM user with at least these permissions:

```auto
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:DescribeInstances"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Action": [
        "iam:DeleteAccessKey",
        "iam:GetUser",
        "iam:CreateAccessKey"
      ],
      "Effect": "Allow",
      "Resource": "[the ARN of your IAM user]"
    }
  ]
}

```

I think you’re missing those IAM permissions in the second statement.

---

<div class="post-metadata">

**Author:** ![purushothamkdr453](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/purushothamkdr453/32/25368_2.png) [@purushothamkdr453](https://discuss.hashicorp.com/u/purushothamkdr453)\
**Post date:** [January 28, 2022, 7:27am UTC](https://discuss.hashicorp.com/t/error-while-using-aws-dynamic-host-catalog-plugin/34760/7 "2022-01-28T07:27:56Z")

</div>

I tried the same set of commands on EC2 Instance(Created One) then it worked. So probably in my local system few problems are occurring due to org vpn or proxy. Not sure exactly what is the root cause. Thanks a lot for your response.
