0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

curl --aws-sigv4 を使用してAWS SSM ParameterStoreの値を取得する

Posted at

curl 7.75.0 で AWS SigV4 をサポートしていると教えてもらいました。
どうやって使うのかメモっておく。

AWS Systems Manager Parameter Store

$ curl --aws-sigv4 "aws:amz" \
    --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \
    -H "X-Amz-Target: AmazonSSM.GetParameter" \
    -H "Content-Type: application/x-amz-json-1.1" \
    -d '{"Name":"/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2","WithDecryption":true}' \
    https://ssm.us-east-1.amazonaws.com/
{
  "Parameter": {
    "ARN": "arn:aws:ssm:us-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2",
    "DataType": "text",
    "LastModifiedDate": 1630616412.613,
    "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2",
    "Type": "String",
    "Value": "ami-087c17d1fe0178315",
    "Version": 51
  }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?