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

Link to amazon envvars configuration #1162

Closed
Jasper-Bekkers opened this issue Jun 7, 2024 · 5 comments
Closed

Link to amazon envvars configuration #1162

Jasper-Bekkers opened this issue Jun 7, 2024 · 5 comments
Labels
documentation This is a problem with documentation pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@Jasper-Bekkers
Copy link

Describe the issue

There are quite a few code samples out there, for example this one on the main page of the aws_sdk_s3 crate, that just use load_from_env() without ever documenting which env vars (or maybe I missed it but at least it wasn't clear from the get-go). Please just link to the relevant documentation, or include the relevant documentation here somewhere.

use aws_sdk_s3 as s3;

#[::tokio::main]
async fn main() -> Result<(), s3::Error> {
    let config = aws_config::load_from_env().await;
    let client = aws_sdk_s3::Client::new(&config);

    // ... make some calls with the client

    Ok(())
}

https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-envvars.html

Links

https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-envvars.html
https://docs.rs/aws-sdk-s3/latest/aws_sdk_s3/client/struct.Client.html

@Jasper-Bekkers Jasper-Bekkers added documentation This is a problem with documentation needs-triage This issue or PR still needs to be triaged. labels Jun 7, 2024
@ysaito1001
Copy link
Collaborator

Thank you for bringing this up to our attention. The name load_from_env is historical, not necessarily referring to just environment variables; it is currently a convenience wrapper around load_defaults. That said, I agree that the rustdoc does not provide information as to what those defaults are.

We can probably link to this page.

@ysaito1001 ysaito1001 removed the needs-triage This issue or PR still needs to be triaged. label Jun 12, 2024
@Jasper-Bekkers
Copy link
Author

Thanks yeah I had to spend quite some time figuring out what they were, even from code its not super clear. Probably this could be a good first issue for someone to pick up also.

@ysaito1001
Copy link
Collaborator

Will be addressed by smithy-lang/smithy-rs#3694

@ysaito1001 ysaito1001 added the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Jun 13, 2024
@ysaito1001
Copy link
Collaborator

The suggested link has been added to docs as of release-2024-06-18 (example)

Copy link

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

No branches or pull requests

2 participants