Skip to content
This repository was archived by the owner on Aug 27, 2023. It is now read-only.
This repository was archived by the owner on Aug 27, 2023. It is now read-only.

Request for opinion with POC implementation done: Update S3 storage backend to properly support rotating / expiring credentials  #319

@nivintw

Description

@nivintw

This is another set of changes / feature that i've implemented to fit my purposes and want to gather feedback before cleaning up and sharing back.

Basically, when in contexts that use rotating AWS credentials the current approach keeps boto3 objects alive for too long, causing the credentials to reach expiration, and causing installs to fail due to internal server errors when the backend tries to communicate with S3 and can not.

Scenarios that benefit from the feature / require it:

  1. when deployed to EC2 instance that has an instance profile
  2. when deployed via k8s / helm / etc that have other infrastructure that dynamically updates the credentials in the container
  3. Any other deployment scenario that requires non-static AWS credentials

The set of changes are scoped to the S3 backend, and are actually relatively minor, although admittedly my current approach is definitely a little "brute force".

In general, the advice i've been given / seen personally is that when interacting with AWS SDKs you don't want to have any long-lived objects for the reasons described above.

Looking for feedback on if a PR would be appreciated here, and sharing publicly to help hold myself accountable to getting the changes shared upstream.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions