-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update docs about auth method for aws bedrock #48
Conversation
Update auth method for aws bedrock
WalkthroughThe README has been updated to provide enhanced configuration instructions for the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant P as Plugin
participant A as AWS Provider
U->>P: Call genkit with AWS region & model
alt Standard Initialization
P->>A: Use default AWS credentials
else Production Environment Authentication
P->>A: Retrieve credentials via @aws-sdk/credential-providers<br/>(using .env file)
else Local Environment Authentication
P->>A: Accept inline AWS credentials
end
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
94-97
: Specify Language in Credential Code BlockThe fenced code block displaying AWS credential placeholders lacks a language specifier, which triggers markdownlint warnings. Adding a language (e.g.,
dotenv
) will improve syntax highlighting and documentation clarity.Example Diff:
-``` +```dotenv🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
94-94: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
94-94: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🔇 Additional comments (12)
README.md (12)
44-45
: Clarify AWS Credentials ConfigurationThe new introductory sentence clearly sets the context by informing users that multiple AWS credentials configuration approaches exist. Ensure that the secure handling of credentials is emphasized to guide best practices.
46-47
: Establish Standard Initialization SectionThe addition of the "#### Standard Initialization" header creates a clear separation for different authentication methods. This improves the readability and organization of the documentation.
48-49
: Standard Initialization ExplanationThe explanation for configuring the plugin via calling the
genkit
function (with AWS region and model parameters) is concise and clear. Verify that the provided example matches the intended usage for users in a standard setup.
52-52
: Verify Import Statement ConsistencyThe updated import statement now includes
{ awsBedrock, amazonNovaProV1 }
from"genkitx-aws-bedrock"
. Confirm that these exports correctly correspond with the intended plugin functionalities, and that there are no discrepancies with other parts of the documentation.
62-63
: Environment Variables Initialization ExampleThe note indicating initialization via preset
AWS_
environment variables is clear. This alternative configuration path helps users who rely on environment-based credential management.
66-67
: Maintain Consistent Import in Environment Variables ExampleThe import statement in the code snippet that demonstrates environment variable-based initialization is consistent with the standard approach. This uniformity aids in reducing confusion for readers.
76-78
: Production Environment Authentication DescriptionThe production authentication section now clearly explains the need to use the
@aws-sdk/credential-providers
package for managing credentials. This is helpful for users deploying in production. Consider linking to the package documentation for further clarity.
80-88
: Production Authentication Code ExampleThe Typescript snippet demonstrates how to import
fromEnv
and configure AWS credentials for production. The code is clear and instructive; ensure that users are aware that using environment-based credential provision in production might require additional security reviews.
92-93
: .env Security ReminderThe added reminder about including the
.env
file in.gitignore
effectively reinforces best practices for handling sensitive information. This is a valuable security tip.
99-100
: Local Environment Authentication HeadingThe "#### Local Environment Authentication" section is well labeled and immediately sets expectations for local dev setups. A brief note reminding developers to avoid committing sensitive credentials could further strengthen this section.
103-115
: Local Authentication Code ExampleThe provided code snippet for local environment authentication clearly illustrates how to manually pass AWS credentials. Confirm that
awsAccessKeyId.value()
andawsSecretAccessKey.value()
are defined or documented elsewhere in the project to avoid confusion for first-time users.
126-134
: Update Model Configuration for Cross-region InferenceThe changes updating the model configuration to use
anthropicClaude35SonnetV2("us")
correctly reflect the updated model version. Verify that the new model is integrated consistently throughout the documentation and that any related references are updated accordingly.
🎉 This PR is included in version 1.8.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Update docs about auth method for aws bedrock
This pull request is related to:
I have checked the following:
Description:
Update docs about auth method for aws bedrock
Related issues:
None
Summary by CodeRabbit