I want to write a Python 3.6 query in AWS Lambda to get details on an AWS SSM parameter store but I get a null response. If I query via AWS CLI I get the details on the parameter store item including the AMI ID which is my ultimate goal. The parameter store path is:
/aws/service/ami-windows-latest/Windows_Server-2019-English-Core-Base-2019.07.12
My code is below, any insight into why this is not returning the expected results would be greatly appreciated.
import json
import boto3
def lambda_handler(event, context):
client = boto3.client('ssm')
response=client.get_parameters(Names=['/aws/service/ami-windows-latest/Windows_Server-2019-English-Full-Base']),
#return "Success"
print (response)
I'm expecting the same output that I get when I run the following AWS CLI command.
aws ssm get-parameters --names /aws/service/ami-windows-latest/Windows_Server-2019-English-Full-Base --region us-east-1