Skip to content

Instantly share code, notes, and snippets.

@codingarchitect
codingarchitect / aws-sigv4-ssm-get-parameter.sh
Last active September 13, 2023 09:36 — forked from slawekzachcial/aws-sigv4-ssm-get-parameter.sh
Using CURL to call AWS ReST API, signing request with v4 signature
#!/bin/bash
# set -x
# Source: https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
[[ -n "${AWS_ACCESS_KEY_ID}" ]] || { echo "AWS_ACCESS_KEY_ID required" >&2; exit 1; }
[[ -n "${AWS_SECRET_ACCESS_KEY}" ]] || { echo "AWS_SECRET_ACCESS_KEY required" >&2; exit 1; }
readonly method="GET"
readonly service="s3"
readonly region="eu-frankfurt-1"