# Metricbeat to use EC2 role permissions to access AWS ELK stack

**URL:** <https://discuss.elastic.co/t/metricbeat-to-use-ec2-role-permissions-to-access-aws-elk-stack/213613>\
**Category:** Beats\
**Tags:** docker, metricbeat\
**Created:** [January 2, 2020, 6:23pm UTC](https://discuss.elastic.co/t/metricbeat-to-use-ec2-role-permissions-to-access-aws-elk-stack/213613 "2020-01-02T18:23:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amanam1203](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@amanam1203](https://discuss.elastic.co/u/amanam1203)\
**Post date:** [January 2, 2020, 6:23pm UTC](https://discuss.elastic.co/t/metricbeat-to-use-ec2-role-permissions-to-access-aws-elk-stack/213613/1 "2020-01-02T18:23:00Z")

</div>

I installed Metricbeat on a EC2 server to monitor docker containers and configured to send the logs to AWS ELK stack. Metricbeat is not utilizing the role that have permission to access ELK stack. How can i configure Metricbeat to use the role that has permissions to access AWS ELK stack? Is there anyway we can configure Metricbeat to access AWS ELK stack?

[root@ip-10-172-210-30 ~]# metricbeat test output  
elasticsearch: [https://elasticservach-sample.us-east-1.es.amazonaws.com:443](https://elasticservach-sample.us-east-1.es.amazonaws.com:443)...  
parse url... OK  
connection...  
parse host... OK  
dns lookup... OK  
addresses: 10.173.11.109, 10.173.13.99, 10.173.200.245  
dial up... OK  
TLS...  
security: server's certificate chain verification is enabled  
handshake... OK  
TLS version: TLSv1.2  
dial up... OK  
talk to server... ERROR 403 Forbidden: {"message":"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic ZWRwLWRldjpJcnZpbmdAMTIwMw=="}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 30, 2020, 6:23pm UTC](https://discuss.elastic.co/t/metricbeat-to-use-ec2-role-permissions-to-access-aws-elk-stack/213613/2 "2020-01-30T18:23:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
