Is there any official way or 'the right way' to convert one of the platforms returned by eb platform list
to the latest version of the eb solution stacks listed by aws elasticbeanstalk list-available-solution-stacks --query 'SolutionStacks'
eb platform list
is going to give you a list of platform "families." Essentially, they are modified names of platforms which have different versions. You probably can't use them "as-is" outside of the EB CLI but you can use them as a heuristic for querying the platform versions from the AWS CLI.
You can use the names from eb platform list
as query filter for list-platform-versions
. So, lets say you're looking for the latest Java 8 platform.
aws elasticbeanstalk list-platform-versions --filters='[{"Type":"PlatformName","Operator":"begins_with","Values":["Java 8"]},{"Type":"PlatformVersion","Operator":"=","Values":["latest"]}]'
That will return one item which you can pluck the ARN and use that as an input into describe-platform-version
.
aws elasticbeanstalk describe-platform-version --platform-arn 'arn:aws:elasticbeanstalk:us-east-1::platform/Java 8 running on 64bit Amazon Linux/2.5.5'
That response should have the solution stack name for the latest platform.