automated-actions/AWS_EBS_VOLUME_LOST/SydneySummitDemo/aws_ebs_vol_lost_cfn.yaml [513:531]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Code:
        ZipFile: |
          import boto3
          cfnclient = boto3.client('cloudformation')

          def lambda_handler(event, context):
              stackname = event['ResourceStack']['StackName']
              amiid = event['RestoredResources']['RestoreImageId']

              cfnresponse = cfnclient.update_stack(
                  StackName= stackname,
                  Parameters=[
                      { 'ParameterKey': 'RestoreImageId', 'ParameterValue': amiid, 'UsePreviousValue': False },
                      { 'ParameterKey': 'SubnetId', 'UsePreviousValue': True },
                      { 'ParameterKey': 'KeyName', 'UsePreviousValue': True },
                      { 'ParameterKey': 'VpcId', 'UsePreviousValue': True }
                  ],
                  UsePreviousTemplate=True,
                  Capabilities=[
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



automated-actions/AWS_EBS_VOLUME_LOST/stepbystep/step_3_stepfunctions_reinvent_workshop.yml [367:383]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Code:
        ZipFile: |
          import boto3
          cfnclient = boto3.client('cloudformation')
          def lambda_handler(event, context):
              stackname = event['ResourceStack']['StackName']
              amiid = event['RestoredResources']['RestoreImageId']
              cfnresponse = cfnclient.update_stack(
                  StackName= stackname,
                  Parameters=[
                      { 'ParameterKey': 'RestoreImageId', 'ParameterValue': amiid, 'UsePreviousValue': False },
                      { 'ParameterKey': 'SubnetId', 'UsePreviousValue': True },
                      { 'ParameterKey': 'KeyName', 'UsePreviousValue': True },
                      { 'ParameterKey': 'VpcId', 'UsePreviousValue': True }
                  ],
                  UsePreviousTemplate=True,
                  Capabilities=[
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



