Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI

on:
push:
branches: [main]
branches: [master]
tags: ['v*']
pull_request:
branches: [main]
branches: [master]

permissions:
contents: write
Expand Down
57 changes: 3 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# env-aws-params

[![CI](https://github.com/gmr/env-aws-params/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/gmr/env-aws-params/actions/workflows/ci.yml)
[![CI](https://github.com/framer/env-aws-params/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/framer/env-aws-params/actions/workflows/ci.yml)

``env-aws-params`` is a tool that injects AWS EC2 Systems Manager (SSM)
[Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html)
Expand All @@ -23,69 +23,18 @@ in the SSM Parameter store. It was directly inspired by
### Pre-built binaries

Static binaries for `linux/amd64`, `linux/arm64`, and `darwin/arm64`
are attached to each [GitHub Release](https://github.com/gmr/env-aws-params/releases).
are attached to each [GitHub Release](https://github.com/framer/env-aws-params/releases).

```bash
VERSION=v1.1.0 # pick from the releases page
OS=$(uname | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')

curl -fL "https://github.com/gmr/env-aws-params/releases/download/${VERSION}/env-aws-params_${OS}-${ARCH}" \
curl -fL "https://github.com/framer/env-aws-params/releases/download/${VERSION}/env-aws-params_${OS}-${ARCH}" \
-o /usr/local/bin/env-aws-params
chmod +x /usr/local/bin/env-aws-params
```

### Docker

Multi-arch container images (`linux/amd64`, `linux/arm64`) are published to
the GitHub Container Registry:

```bash
docker pull ghcr.io/gmr/env-aws-params:latest
```

Available tags:

- `latest` — most recent commit on `main`
- `main` — alias for `latest`
- `<version>`, `<major>.<minor>`, `<major>` — tagged releases (e.g. `1.1.0`, `1.1`, `1`)

The binary is installed at `/usr/local/bin/env-aws-params`, and the image's entrypoint is set to it, so flags and the wrapped command go directly to `docker run`:

```bash
docker run --rm \
-v "$HOME/.aws:/root/.aws:ro" \
-e AWS_PROFILE \
ghcr.io/gmr/env-aws-params:latest \
--prefix /service-prefix /bin/sh -c env
```

#### Copy the binary into your own image

Because the binary is statically linked, you can copy it into any base image with a `COPY --from=` directive. This is the recommended pattern — your image keeps its own base, and `env-aws-params` just rides along as the entrypoint:

```dockerfile
FROM python:3.13-alpine

COPY --from=ghcr.io/gmr/env-aws-params:latest \
/usr/local/bin/env-aws-params /usr/local/bin/env-aws-params

COPY my-app /usr/local/bin/my-app

ENTRYPOINT ["env-aws-params", "--prefix", "/my-service"]
CMD ["my-app"]
```

#### Use it as a base image

If you don't have a base image preference, you can also build `FROM` it directly (Alpine + `ca-certificates`):

```dockerfile
FROM ghcr.io/gmr/env-aws-params:latest
COPY my-app /usr/local/bin/my-app
CMD ["my-app"]
```

## Example Usage

Create parameters in Parameter Store:
Expand Down