AWS Controllers for Kubernetes - S3

kubernetes aws s3 operator

3 min read | by Jordi Prats

Amazon has recently released a set of controllers (actually they are operators because they are using CRDs) to create resources on AWS using Kubernetes objects. It works in the same way it crossplane works

Let's install an test the ACK S3

We can install the operator by cloning the repository (there's no reference on where they host the helm chart):

git clone

If we are using IRSA we'll need to create a values file to push the annotation to the ServiceAccount:

  annotations: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME

Then we can install the helm chart using the local copy as follows:

helm install s3controller s3-controller/helm/ -n aws-controllers --create-namespace -f irsa.yaml

Once the controller is up and running:

$ kubectl get pods -n aws-controllers
NAME                                    READY   STATUS    RESTARTS   AGE
s3controller-s3-chart-85b88fc55-86z24   1/1     Running   0          11m

We can now use the Bucket CRD to create a new S3 bucket:

kind: Bucket
  name: k8s-demo-bucket
  name: testjordi-demo-bucket

Once applied neither kubectl get bucket:

$ kubectl apply -f helpers/s3controller/demo_bucket.yaml created
$ kubectl get bucket
NAME              AGE
k8s-demo-bucket   5s

Or kubectl describe provide much information about the actual state of the S3 bucket:

$ kubectl describe
Name:         k8s-demo-bucket
Namespace:    testvault
Labels:       <none>
Annotations:  <none>
API Version:
Kind:         Bucket
  Creation Timestamp:  2022-09-22:53:37Z
  Generation:  1
  Managed Fields:
    API Version:
    Fields Type:  FieldsV1

    Manager:      kubectl-client-side-apply
    Operation:    Update
    Time:         2022-09-16T22:54:09Z
    API Version:
    Fields Type:  FieldsV1
    Manager:         controller
    Operation:       Update
    Time:            2022-09-16T22:54:10Z
  Resource Version:  94893
  UID:               f099feb7-7cdb-41c4-b747-0af920c1fc80
  Name:  testjordi-demo-bucket
Events:  <none>

But we can use awstools to check that the S3 bucket has been created:

$ awstools s3 list
k3s-awswebk3s                                                2022-09-01 06:09:58+00:00
testjordi-demo-bucket                                        2022-09-16 22:54:12+00:00

If we delete the object:

k delete -f helpers/s3controller "k8s-demo-bucket" deleted

The S3 bucket is going to go away as well:

$ awstools s3 list
k3s-awswebk3s                                                2022-09-01 06:09:58+00:00

At the end of the day, it provides the same functionality as crossplane but without all the bells and whistles. Mainly because it haven't been out there for that long, let's see if this changes in the future

Posted on 21/09/2022