wjayesh commited on
Commit
1e10752
·
verified ·
1 Parent(s): 4a680e4

Upload how-to-guides.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. how-to-guides.txt +73 -0
how-to-guides.txt ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === File: docs2/book/test.md ===
2
+
3
+ ### Summary of AWS Service Connector Documentation
4
+
5
+ **Overview:**
6
+ The ZenML AWS Service Connector enables seamless authentication and access to various AWS resources, including S3 buckets, EKS Kubernetes clusters, and ECR container registries. It supports multiple authentication methods such as AWS secret keys, IAM roles, STS tokens, and implicit authentication.
7
+
8
+ **Key Features:**
9
+ - **Authentication Methods:**
10
+ - **Implicit Authentication:** Uses environment variables or IAM roles. Requires enabling via `ZENML_ENABLE_IMPLICIT_AUTH_METHODS`.
11
+ - **AWS Secret Key:** Long-lived credentials; not recommended for production.
12
+ - **AWS STS Token:** Temporary tokens; requires manual refresh.
13
+ - **AWS IAM Role:** Generates temporary STS tokens by assuming a role.
14
+ - **AWS Session Token:** Generates temporary session tokens for IAM users.
15
+ - **AWS Federation Token:** Generates tokens for federated users.
16
+
17
+ - **Resource Types:**
18
+ - **Generic AWS Resource:** Access any AWS service with a pre-configured boto3 session.
19
+ - **S3 Bucket:** Requires specific IAM permissions for S3 actions.
20
+ - **EKS Cluster:** Requires permissions to list and describe clusters.
21
+ - **ECR Registry:** Access to ECR repositories with specific permissions.
22
+
23
+ **Configuration Commands:**
24
+ - List available AWS service connector types:
25
+ ```shell
26
+ $ zenml service-connector list-types --type aws
27
+ ```
28
+ - Register a service connector:
29
+ ```shell
30
+ AWS_PROFILE=connectors zenml service-connector register aws-implicit --type aws --auth-method implicit --region=us-east-1
31
+ ```
32
+ - Verify access to resources:
33
+ ```shell
34
+ zenml service-connector verify aws-implicit --resource-type s3-bucket
35
+ ```
36
+
37
+ **Local Client Provisioning:**
38
+ - Local AWS CLI, Kubernetes `kubectl`, and Docker CLI can be configured with credentials from the AWS Service Connector. The local AWS CLI configuration profile will be named based on the Service Connector UUID.
39
+
40
+ **Stack Components Usage:**
41
+ - Connect S3 Artifact Store, EKS Orchestrator, and ECR Container Registry to AWS resources using the AWS Service Connector. This allows for streamlined management of resources without manual credential configuration.
42
+
43
+ **End-to-End Example:**
44
+ 1. Configure AWS CLI with IAM user credentials.
45
+ 2. Register a multi-type AWS Service Connector.
46
+ 3. Connect various Stack Components (S3, EKS, ECR) using the registered connector.
47
+ 4. Run a simple pipeline to validate the setup.
48
+
49
+ **Example Pipeline Code:**
50
+ ```python
51
+ from zenml import pipeline, step
52
+
53
+ @step
54
+ def step_1() -> str:
55
+ return "world"
56
+
57
+ @step(enable_cache=False)
58
+ def step_2(input_one: str, input_two: str) -> None:
59
+ print(f"{input_one} {input_two}")
60
+
61
+ @pipeline
62
+ def my_pipeline():
63
+ output_step_one = step_1()
64
+ step_2(input_one="hello", input_two=output_step_one)
65
+
66
+ if __name__ == "__main__":
67
+ my_pipeline()
68
+ ```
69
+
70
+ This documentation provides a comprehensive guide to setting up and using the ZenML AWS Service Connector for accessing AWS resources securely and efficiently.
71
+
72
+ ==================================================
73
+