By using AWS re:Post, you agree to the Terms of Use
/Parameter Store/

Questions tagged with Parameter Store

Sort by most recent
  • 1
  • 90 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Receiving Validation Error on Payload input (Lambda) when using via SSM Automation Document

Hello, I've cloned the AWS-UpdateWindowsAMI document and added two steps for invoking Lamda function to update the parameter store with the latest AMI ID and creating EC2 tags. I'm getting the error below when I run into the aws:invokelambdafunction block. Everything else works. > Step fails when it is validating and resolving the step inputs. Failed to resolve input: createImage.ImageId to type String. createImage is not defined in Automation Document MainSteps.. Please refer to Automation Service Troubleshooting Guide for more diagnosis details. VerificationErrorMessage Failed to resolve input: createImage.ImageId to type String. createImage is not defined in Automation Document MainSteps. I've copied the LamdaFunction code straight of [this document](https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-walk-patch-windows-ami-simplify.html#automation-pet1). This is the updatessmparam code in the document. I've only replaced the parameterName in the code. { "name": "CreateImage", "action": "aws:createImage", "maxAttempts": 3, "onFailure": "Abort", "inputs": { "InstanceId": "{{ LaunchInstance.InstanceIds }}", "ImageName": "{{ TargetAmiName }}", "NoReboot": true, "ImageDescription": "{{ TargetImageDescription }}" } }, { "name": "TerminateInstance", "action": "aws:changeInstanceState", "maxAttempts": 3, "onFailure": "Abort", "inputs": { "InstanceIds": [ "{{ LaunchInstance.InstanceIds }}" ], "DesiredState": "terminated" } }, { "name": "updateSsmParam", "action": "aws:invokeLambdaFunction", "timeoutSeconds": 1200, "maxAttempts": 1, "onFailure": "Continue", "inputs": { "FunctionName": "Automation-UpdateSsmParam", "Payload": "{\"parameterName\":\"/ami/latest/us-east-1/win2k19sf-cb\", \"parameterValue\":\"{{createImage.ImageId}}\"}" } }, Any help would be appreciated. Thanks. Justin
3
answers
0
votes
3
views
asked 2 months ago
  • 1
  • 90 / page