Horje
AWS CloudFormation: Assume that you have a root stack and a nested stack. How will you pass a value to the nested stack from the root stack? Explain using an example. Code Example
AWS CloudFormation: Assume that you have a root stack and a nested stack. How will you pass a value to the nested stack from the root stack? Explain using an example.
There is no way (yet) to pass every parameter at once from the root stack to the nested stack. If you want to pass every parameter, you have to do it one by one.

Here is sample template to give you an idea.

Master.yaml:

Resources:
  Cloudspan:
    Type: "AWS::CloudFormation::Stack"
    Properties:
      Parameters:
        LambdaName: Cloudspan
        BucketName: <BucketName>
        S3KeyName: <S3KeyName>
        FunctionName: <FunctionName>
      TemplateURL: <TemplateURL>
  Alignment:
    Type: "AWS::CloudFormation::Stack"
    Properties:
      Parameters:
        LambdaName: Alignment
        BucketName: <BucketName>
        S3KeyName: <S3KeyName>
        FunctionName: <FunctionName>
      TemplateURL: <TemplateURL>
Lambda-child.yaml:

Parameters:
  LambdaName:
    Type: String
  BucketName:
    Type: String
  S3KeyName:
    Type: String
  FunctionName:
    Type: String

Resources:
  LambdaFunction:
    Type: "AWS::Lambda::Function"
    Properties:
      Handler: !Sub '${LambdaName}-{FunctionName}.Handler'
      Role:
        Fn::GetAtt: ['LambdaExecutionRole', Arn ]
      Code:
        S3Bucket: !Sub '${LambdaName}{BucketName}'
        S3Key: !Sub '${LambdaName}{S3KeyName}'
      Runtime: "python3.6"




Whatever

Related
load and unload globalprotect Code Example load and unload globalprotect Code Example
ansible error unzipping "Could not find a part of the path" Code Example ansible error unzipping "Could not find a part of the path" Code Example
find if the value entered is valid hex code Code Example find if the value entered is valid hex code Code Example
How can I do a foreach loop for an array of booleans Code Example How can I do a foreach loop for an array of booleans Code Example
forgot mamp root password Code Example forgot mamp root password Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9