README.md 1.0 KB

afsxdr-binaries distribution files

I hate to put binaries into git, but they need to be zips to send up to lambda. I could conceivably do all of this via terraform's "archive_file" data type (it's useful for lambda deployments!), but it complicates things and hopefully the changes to these binaries are a very rare thing.

aws-instance-scheduler

The lambda function to start/stop instances in test

Method used to create govcloud version:

  1. Download the lambda distribution package:

    aws s3 cp s3://aws-instance-scheduler/latest/instance-scheduler-2.2.2.0.zip . --profile mdr-common-services
    
  2. Unzip it.

    mkdir tmp
    cd tmp
    unzip ../instance-scheduler-2.2.2.0.zip
    
  3. Modify schedulers/instance_scheduler.py:

Line 91 used go be:

        self._valid_regions = boto3.Session().get_available_regions(service.service_name)

Change it to:

        self._valid_regions = boto3.Session().get_available_regions(service=service.service_name, partition='aws-us-gov')
  1. Zip it back up:

    zip -r ../instance-scheduler.aws-us-gov.zip *