<p>I'm trying to configure a Kubernetes job to run a set of bash and python scripts that contains some AWS CLI commands.</p>

<p>Is there a good image out there for doing that?  Do I need to create a custom docker image?  I just want a container with these tools installed, what's the easiest way of getting there?</p>

<p>Easiest would be getting any image from Docker hub containing AWS CLI, for example <a href="https://hub.docker.com/r/woahbase/alpine-awscli" rel="nofollow noreferrer"><code>woahbase/alpine-awscli</code></a>.</p>

<p>You can use it in a following way <code>kubectl run aws-cli --image=woahbase/alpine-awscli</code></p>

<p>This would create a <code>pod</code> names aws-cli which would contain following image.
You would need to upload your scripts to the <code>pod</code> or mount a storage <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/" rel="nofollow noreferrer">Configure a Pod to Use a PersistentVolume for Storage</a>.</p>

<p>Keep in mind this is not recommended as this image does not belong to you and you have no idea if there were no changes before checking.</p>

<p>I would create my own Docker hub repo and build my own image, something like the following:</p>

<pre><code>FROM alpine:3.6
RUN apk -v --update add \
        python \
        py-pip \
        groff \
        less \
        mailcap \
        &amp;&amp; \
    pip install --upgrade awscli==1.14.5 s3cmd==2.0.1 python-magic &amp;&amp; \
    apk -v --purge del py-pip &amp;&amp; \
    rm /var/cache/apk/*
VOLUME /root/.aws
VOLUME /project
WORKDIR /project
ENTRYPOINT ["aws"]
</code></pre>
