-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libbeat][aws] Fix AWS config initialization issue when using a role #31014
Conversation
This pull request does not have a backport label. Could you fix it @zmoog? 🙏
NOTE: |
a722785
to
4151a26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Could you add a changelog to it please? Thanks!
4151a26
to
706861b
Compare
Oh! 🤦 Thanks for the heads up! 🙇 |
@kaiyan-sheng could you please double check the CHANGELOG entry is in the right place for this issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog entry looks good to me! Thanks!
95d457b
to
f0ea446
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
According to `.golangci.yml`, the `github.com/pkg/errors` module is now in the blocked list.
f0ea446
to
2919fec
Compare
…issue when using a role (#31181) [libbeat][aws] Fix AWS config initialization issue when using a role (#31014) * Move assume role to AWS config initialisation * Wrap default aws config errors using std library (cherry picked from commit cb5a951) Co-authored-by: Maurizio Branca <maurizio.branca@gmail.com> Co-authored-by: Denis Rechkunov <denis.rechkunov@elastic.co>
…lastic#31014) * Move assume role to AWS config initialisation * Wrap default aws config errors using std library
…31014) * Move assume role to AWS config initialisation * Wrap default aws config errors using std library
What does this PR do?
Set up the
AssumeRoleProvider
after the AWS region value from Filebeat settings is applied to the AWS SDK configuration.Why is it important?
When Filebeat uses a role ARN, it sets up
AssumeRoleProvider
before evaluating the region value from its settings.If the AWS SDK configuration loaded from
~/.aws/config
does not contain a region, the error described in #30999 happens.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Requirements:
https://sqs.eu-west-1.amazonaws.com/000123456789/elastic-cloudtrail-logs
),arn:aws:iam::000123456789:role/elastic-agent-role
)Configure the IAM Role as EC2 instance role with the following trust relationship:
Also add some permission to the role to access SQS and S3 ("Amazon SQS Full Access" and "SQS Read only Access" are probably fine for a quick test).
Here's an example command line arguments for Filebeat:
Related issues
Use cases
Screenshots
Logs