We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f84fc1f commit f3d4d96Copy full SHA for f3d4d96
scripts/aws_resize.py
@@ -7,11 +7,9 @@
7
ec2_client = boto3.client('ec2')
8
ec2_resource = boto3.resource('ec2')
9
10
-# Get the AMI name from environment variable
11
-AMI_NAME = os.environ.get('PRE_AMI_NAME')
12
-
13
def launch_temporary_instance():
14
# Describe the AMI
+ AMI_NAME = os.environ.get('PRE_AMI_NAME')
15
images = ec2_client.describe_images(Owners=['self'], Filters=[{'Name': 'name', 'Values': [AMI_NAME]}])
16
if not images['Images']:
17
raise Exception(f"No AMI found with name: {AMI_NAME}")
0 commit comments