From 68542bcc98471ba5c5cae9890140bbc4b9246714 Mon Sep 17 00:00:00 2001 From: Sebastian Rieger Date: Mon, 30 May 2022 17:49:56 +0200 Subject: [PATCH] changed cloudformation example to support AWS Academy Lab --- .../cloudcomp-counter-demo-with-vpc.json | 3 ++- .../cloudcomp-counter-demo.json | 0 .../counter-demo/aws-cloudformation/start-with-vpc.py | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) rename example-projects/counter-demo/aws-cloudformation/{ => old-example-without-vpc}/cloudcomp-counter-demo.json (100%) diff --git a/example-projects/counter-demo/aws-cloudformation/cloudcomp-counter-demo-with-vpc.json b/example-projects/counter-demo/aws-cloudformation/cloudcomp-counter-demo-with-vpc.json index 0e3d8ac..68ffbf5 100644 --- a/example-projects/counter-demo/aws-cloudformation/cloudcomp-counter-demo-with-vpc.json +++ b/example-projects/counter-demo/aws-cloudformation/cloudcomp-counter-demo-with-vpc.json @@ -18,11 +18,12 @@ }, "paramKeyPair": { "Type": "AWS::EC2::KeyPair::KeyName", + "Default": "vockey", "Description": "Amazon EC2 Key Pair" }, "paramIamInstanceRole": { "Type": "String", - "Default": "ec2-s3-vertsys-access-role", + "Default": "LabRole", "Description": "IAM Instance Role" } }, diff --git a/example-projects/counter-demo/aws-cloudformation/cloudcomp-counter-demo.json b/example-projects/counter-demo/aws-cloudformation/old-example-without-vpc/cloudcomp-counter-demo.json similarity index 100% rename from example-projects/counter-demo/aws-cloudformation/cloudcomp-counter-demo.json rename to example-projects/counter-demo/aws-cloudformation/old-example-without-vpc/cloudcomp-counter-demo.json diff --git a/example-projects/counter-demo/aws-cloudformation/start-with-vpc.py b/example-projects/counter-demo/aws-cloudformation/start-with-vpc.py index 388c424..62a062d 100644 --- a/example-projects/counter-demo/aws-cloudformation/start-with-vpc.py +++ b/example-projects/counter-demo/aws-cloudformation/start-with-vpc.py @@ -16,8 +16,9 @@ import boto3 # region = 'eu-central-1' region = 'us-east-1' stackName = 'cloudcomp-counter-demo-stack' -keyName = 'srieger-pub' - +# keyName = 'srieger-pub' +keyName = 'vockey' +roleName = 'LabRole' ################################################################################################ # @@ -49,5 +50,9 @@ response = cfClient.create_stack( 'ParameterKey': 'paramKeyPair', 'ParameterValue': keyName }, + { + 'ParameterKey': 'paramIamInstanceRole', + 'ParameterValue': roleName + }, ], )