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

Phase out use of deprecated SQS endpoints #2683

Closed
acdha opened this issue May 25, 2022 · 5 comments
Closed

Phase out use of deprecated SQS endpoints #2683

acdha opened this issue May 25, 2022 · 5 comments
Labels
endpoints feature-request This issue requests a feature. p2 This is a standard priority issue sqs

Comments

@acdha
Copy link

acdha commented May 25, 2022

Describe the bug

boto's SQS client still defaults to queue.amazonaws.com which appears to have been deprecated since at least 2011. This requires everyone following Amazon's recommended security best practices to diagnose non-obvious error messages and then update every client invocation to override the endpoint URL:

SQS = boto3.client(
    "sqs",
    endpoint_url="https://sqs.{}.amazonaws.com".format(
        os.environ.get("AWS_DEFAULT_REGION", "us-east-1")
    ),
)

Partial list of past reports:

There were two concerns raised in various tickets:

  • Python 2.6, which hit end-of-life 9 years ago and should not be a consideration now that Python 2 is no longer supported by this library
  • Non-specific concerns about backwards compatibility. That would certainly warrant a prominent notice in the release notes but anyone running egress filtering that tightly has likely a) already encountered the need for both names and b) is a much smaller group of users than the people whose new code is breaking.

Expected Behavior

The default is the endpoints which have been recommended since the 2000s

Current Behavior

The old PrivateLink-incompatible endpoints are used

Reproduction Steps

SQS = boto3.client("sqs")

Possible Solution

  1. Change the default to the sqs.amazonaws.com endpoints
  2. Prominently document this in the release notes with fallback instructions
  3. With more work, trap connection errors when using the default endpoint and fallback to the old one with a deprecation warning

Additional Information/Context

No response

SDK version used

any

Environment details (OS name and version, etc.)

any

@acdha acdha added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels May 25, 2022
@tim-finnigan
Copy link
Contributor

Hi @acdha thanks for reaching out. Since Python 2 no longer supported that should no longer be a factor as you mentioned. Backwards compatibility is still a concern as changing the default endpoint could break users but this is something that requires more investigation. I created a backlog item for the team to dig deeper into this and we will update this issue as soon as we have more information.

@tim-finnigan tim-finnigan added feature-request This issue requests a feature. sqs and removed bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels May 26, 2022
@acdha
Copy link
Author

acdha commented May 26, 2022

Thanks! I appreciate the backwards compatibility risk so am not expecting instant changes but I figure at this point it seems to be breaking brand new code on a regular basis, too. I wish there was an easy way to know a VPC endpoint existed since you’d almost always want to use one if so.

@stationname
Copy link

Can anyone provide information until what date backwards compatibility is given?

@nateprewitt
Copy link
Contributor

It looks like this ticket may have been left out of the rollout for #2705 and #2804. Starting in botocore 1.27.0 we started phasing out the old naming pattern for SQS endpoints with an explicit opt-out in warning. In November 2022, the old pattern was completely removed from the SDK in 1.29.0, favoring the sqs.{region}.amazonaws.com format.

Given we're 18 months on and haven't received any significant feedback, we'll close this as resolved. Thanks everyone for the feedback!

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endpoints feature-request This issue requests a feature. p2 This is a standard priority issue sqs
Projects
None yet
Development

No branches or pull requests

5 participants