# Connect AWS Kubernetes weaviate via python v4 version

**URL:** <https://forum.weaviate.io/t/connect-aws-kubernetes-weaviate-via-python-v4-version/2520>\
**Category:** Support\
**Created:** [May 28, 2024, 1:06pm UTC](https://forum.weaviate.io/t/connect-aws-kubernetes-weaviate-via-python-v4-version/2520 "2024-05-28T13:06:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alisha\_liu](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/alisha_liu/32/1035_2.png) [@alisha\_liu](https://forum.weaviate.io/u/alisha_liu)\
**Post date:** [May 28, 2024, 1:06pm UTC](https://forum.weaviate.io/t/connect-aws-kubernetes-weaviate-via-python-v4-version/2520/1 "2024-05-28T13:06:36Z")

</div>

Before I use python v3 to connect AWS Kubernetes weaviate use below code:  
client = weaviate.Client(  
url = " \*\*\*\*\*\*\*\*\* “,  
auth\_client\_secret=weaviate.auth.AuthApiKey(api\_key=” \*\*\*\*\*\*\* "),  
additional\_headers= {  
“X-AWS-Access-Key”: " \*\*\*\*\*\*\*\* ",  
“X-AWS-Secret-Key”: " \*\*\*\*\*\*\*\* ",  
}  
)

could you help me refactor above code with python v4 version.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [May 29, 2024, 6:27pm UTC](https://forum.weaviate.io/t/connect-aws-kubernetes-weaviate-via-python-v4-version/2520/2 "2024-05-29T18:27:53Z")

</div>

hi @alisha_liu !

The new python v4 also uses [GRPC](https://weaviate.io/developers/weaviate/api/grpc). Because of that, it will also expect a listening GRPC service on port 50051.

This was [also changed in our helm chart](https://github.com/weaviate/weaviate-helm/blob/c748e6d66771e1bdc9eab78f2b3ac2dc88c0db2b/weaviate/values.yaml#L134)

Let me know if this helps!

Thanks!
