diff options
author | Jake Buchholz <tomalok@gmail.com> | 2019-06-03 23:27:17 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2019-07-05 12:51:09 -0700 |
commit | ed0559ef726dfc9754d6d2718d28db97b81357f2 (patch) | |
tree | c6ff67dd54e596abd7686a395026cc699e2dc39d | |
parent | d206223baead6e2d3a477ba69b4d6a2990fd3e3d (diff) | |
download | alpine-ec2-ami-ed0559ef726dfc9754d6d2718d28db97b81357f2.tar.bz2 alpine-ec2-ami-ed0559ef726dfc9754d6d2718d28db97b81357f2.tar.xz alpine-ec2-ami-ed0559ef726dfc9754d6d2718d28db97b81357f2.zip |
README: add example aws cli command for listing the latest current-x86_64 build
-rw-r--r-- | README.md | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -8,6 +8,23 @@ and supported.** | |||
8 | ***To get started with one of our pre-built minimalist AMIs, please refer to the | 8 | ***To get started with one of our pre-built minimalist AMIs, please refer to the |
9 | [README](releases/README.md) in the [releases](releases) subdirectory.*** | 9 | [README](releases/README.md) in the [releases](releases) subdirectory.*** |
10 | 10 | ||
11 | Alternately, with the right filters, you can query the EC2 API to programmatically | ||
12 | find our most recent AMIs. For example, using the `aws` command line tool... | ||
13 | ``` | ||
14 | aws ec2 describe-images \ | ||
15 | --output text \ | ||
16 | --filters \ | ||
17 | Name=owner-id,Values=538276064493 \ | ||
18 | Name=name,Values='alpine-ami-*' \ | ||
19 | Name=state,Values=available \ | ||
20 | Name=tag:profile_build,Values=current-x86_64 \ | ||
21 | --query 'max_by(Images[], &CreationDate).ImageId' | ||
22 | ``` | ||
23 | ...will list the latest AMI id from our collection of 'current-x86_64' builds. | ||
24 | Refer to the AWS CLI Command Reference for | ||
25 | [describe-images](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html) | ||
26 | for more details. | ||
27 | |||
11 | ## Custom AMIs | 28 | ## Custom AMIs |
12 | 29 | ||
13 | Using the scripts and configuration in this project, you can build your own | 30 | Using the scripts and configuration in this project, you can build your own |