Skip to content

Commit

Permalink
Updated Bedrock notes (#546)
Browse files Browse the repository at this point in the history
* Updated ECR/test-ecr-pull-through-cache-pull.sh
* Updated Bedrock
  • Loading branch information
kyhau authored Feb 27, 2024
1 parent 7edeab2 commit 4a1f231
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
9 changes: 9 additions & 0 deletions Bedrock/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Bedrock

- Bedrock, LangChain, RAG (Retrieval Augmented Generation), streamlit
- Bedrock, Knowledge Base, Agents for Bedrock

Using Knowledge base
1. AWS SDK/CLI - `Retrieve` and `RetrieveAndGenerate`
2. Opensource LangChain - Bedrock integration
3. Agent for Bedrock
4 changes: 4 additions & 0 deletions Bedrock/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
boto3==1.34.47
langchain==0.1.8
langchain-community==0.0.21
streamlit==1.31.1
9 changes: 9 additions & 0 deletions ECR/test-ecr-pull-through-cache-pull.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

AWS_REGION=ap-southeast-2
PRIV_REGISTRY=123456789012.dkr.ecr.${AWS_REGION}.amazonaws.com

aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${PRIV_REGISTRY}

docker pull ${PRIV_REGISTRY}/ecr-public/amazonlinux/amazonlinux:latest
11 changes: 7 additions & 4 deletions ECR/test-ecr-pull-through-cache.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash
set -e

AWS_REGION=ap-southeast-2
PRIV_REGISTRY=123456789012.dkr.ecr.${AWS_REGION}.amazonaws.com
aws ecr describe-pull-through-cache-rules

aws ecr create-pull-through-cache-rule --ecr-repository-prefix ecr-public --upstream-registry-url public.ecr.aws --region ap-southeast-2

# aws ecr create-pull-through-cache-rule --ecr-repository-prefix docker-hub --upstream-registry-url registry-1.docker.io --region ap-southeast-2

aws ecr validate-pull-through-cache-rule --ecr-repository-prefix ecr-public --region ap-southeast-2

aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${PRIV_REGISTRY}

docker pull ${PRIV_REGISTRY}/ecr-public/amazonlinux/amazonlinux:latest
1 change: 0 additions & 1 deletion EKS/list_open_id_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

class Helper(AwsApiHelper):
def process_account(self, session, account_id, aws_region, service, kwargs):
results = []

for region in session.get_available_regions(service) if aws_region == "all" else [aws_region]:
try:
Expand Down

0 comments on commit 4a1f231

Please sign in to comment.