changed cloudformation example to support AWS Academy Lab

This commit is contained in:
Sebastian Rieger 2022-05-30 17:49:56 +02:00
parent 14347b0b47
commit 68542bcc98
3 changed files with 9 additions and 3 deletions

View File

@ -18,11 +18,12 @@
}, },
"paramKeyPair": { "paramKeyPair": {
"Type": "AWS::EC2::KeyPair::KeyName", "Type": "AWS::EC2::KeyPair::KeyName",
"Default": "vockey",
"Description": "Amazon EC2 Key Pair" "Description": "Amazon EC2 Key Pair"
}, },
"paramIamInstanceRole": { "paramIamInstanceRole": {
"Type": "String", "Type": "String",
"Default": "ec2-s3-vertsys-access-role", "Default": "LabRole",
"Description": "IAM Instance Role" "Description": "IAM Instance Role"
} }
}, },

View File

@ -16,8 +16,9 @@ import boto3
# region = 'eu-central-1' # region = 'eu-central-1'
region = 'us-east-1' region = 'us-east-1'
stackName = 'cloudcomp-counter-demo-stack' 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', 'ParameterKey': 'paramKeyPair',
'ParameterValue': keyName 'ParameterValue': keyName
}, },
{
'ParameterKey': 'paramIamInstanceRole',
'ParameterValue': roleName
},
], ],
) )