Skip to content
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

Add default region config to AWS #29415

Merged
merged 3 commits into from
Dec 15, 2021
Merged

Conversation

legoguy1000
Copy link
Contributor

@legoguy1000 legoguy1000 commented Dec 14, 2021

What does this PR do?

Adds a new config to the AWS common module deafult_region.

Why is it important?

This is to resolve issues as discussed in https://discuss.elastic.co/t/input-aws-s3-failed-with-failed-to-initialize-s3-poller/288130. Currently the module uses the us-east-1 region as the default anytime there isn't another item overriding it, like to query the location of a S3 bucket. As shown in the forum, that doesn't always work and should have a way to change the default like with the AWS CLI.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Run unit/integration tests for the AWS common module

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 14, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2021

This pull request does not have a backport label. Could you fix it @legoguy1000? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Dec 14, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Dec 14, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-12-14T15:40:07.567+0000

  • Duration: 145 min 55 sec

  • Commit: e831965

Test stats 🧪

Test Results
Failed 0
Passed 28973
Skipped 1917
Total 30890

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b aws-default-region upstream/aws-default-region
git merge upstream/master
git push upstream aws-default-region

@aspacca
Copy link
Contributor

aspacca commented Dec 14, 2021

thanks @legoguy1000 for the PR

only thing left is to add test coverage for the change

@legoguy1000
Copy link
Contributor Author

thanks @legoguy1000 for the PR

only thing left is to add test coverage for the change

Yup tracking, it's on my list for later today.

@legoguy1000 legoguy1000 marked this pull request as ready for review December 14, 2021 15:39
@aspacca aspacca added the backport-v8.0.0 Automated backport with mergify label Dec 15, 2021
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Dec 15, 2021
@aspacca aspacca merged commit 81ed8f8 into elastic:master Dec 15, 2021
@aspacca aspacca added the Team:Integrations Label for the Integrations team label Dec 15, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 15, 2021
mergify bot pushed a commit that referenced this pull request Dec 15, 2021
* Add default regon config to AWS

* update changelog

* Add tests

(cherry picked from commit 81ed8f8)

# Conflicts:
#	x-pack/libbeat/common/aws/credentials.go
#	x-pack/libbeat/common/aws/credentials_test.go
#	x-pack/libbeat/docs/aws-credentials-config.asciidoc
@legoguy1000 legoguy1000 deleted the aws-default-region branch December 15, 2021 13:22
kaiyan-sheng pushed a commit that referenced this pull request Dec 15, 2021
(cherry picked from commit 81ed8f8)
Co-authored-by: Alex Resnick <[email protected]>
Co-authored-by: Andrea Spacca <[email protected]>
@ayushmathur86
Copy link

Hello,
Any idea when this update will be available and in what version of beats ? I'm currently running on 7.16.2 so would like to prepare for the next upgrade for this change.
Thank You !

@legoguy1000
Copy link
Contributor Author

Right now it's only in 8.0+. @aspacca is it too late to get into the next 7.x version?

@aspacca
Copy link
Contributor

aspacca commented Jan 4, 2022

@ayushmathur86 @legoguy1000

the feature will hit 8.0
7.17 and 8.0 releases are only one week away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.0.0 Automated backport with mergify Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants