Automation Flashcards
What is CloudFormation?
CloudFormation is perfect for creating immutable architecture.
When you create resources using CloudFormation, you can easily
pick that template up and run it anywhere you want.
What is Elastic Beanstalk?
The Amazon PaaS tool.
What Is Systems Manager?
Systems Manager is a suite of tools designed to let you view, control, and
automate both your AWS architecture and on-premises resources.
Features of Systems Manager
-
Automation Documents: Can be used to control your instances or
AWS resources(For example, using Automation documents to fix S3 bucket
permissions or using Session Manager to connect to an instance. ) - Run Command: Execute commands on your hosts
- Patch Manager: Manages your application versions
- Parameter Store: Securely store your secret values
-
Hybrid Activations: Control your on-premises architecture
using Systems Manager -
Session Manager: Remotely connect and interact with
your architecture
How are AWS CloudFormation template parameters used?
- They are defined in the
Parameters
section of the template. - Users can provide values for parameters when creating or updating a stack.
What are AWS CloudFormation pseudo parameters and how are they used?
- Pseudo parameters are predefined variables in AWS CloudFormation.
- Pseudo parameters do not need to be explicitly defined in the
Parameters
section. - Examples include AWS::Region, AWS::Partition, and AWS::AccountId.
- Pseudo parameters are automatically populated by AWS CloudFormation.
What are the purposes of the AWS CloudFormation intrinsic functions !Ref and !GetAtt?
- !Ref is used to get the value of a specified parameter or resource within a CloudFormation template (!Ref LogicalResource OR !Ref Parameter )
- !GetAtt is used to retrieve the value of an attribute from a specified resource in the stack (!GetAtt LogicalResource.Attribute).
What AWS CloudFormation intrinsic function is used for selecting elements from a list?
- !Fn::Select: Retrieves a specified element from a list.
SelectedElement:
Description: “Select the second element from the list”
Value: !Fn::Select [1, [“Element1”, “Element2”, “Element3”]]
What AWS CloudFormation intrinsic function is used for retrieving availability zones from a region?
- !Fn::GetAZs: Returns a list of availability zones for a specified region.
AvailabilityZones:
Description: “List of availability zones in the us-east-1 region”
Value: !Fn::GetAZs: us-east-1
What AWS CloudFormation intrinsic functions are used for joining and splitting strings in a template?
- !Fn::Join: Concatenates a list of values into a single string using a specified delimiter.
- !Fn::Split: Splits a string into a list of substrings based on a specified delimiter.
Examples:
```yaml
JoinedString:
Description: “Concatenate values into a comma-separated string”
Value: !Fn::Join [”,”, [“Value1”, “Value2”, “Value3”]]
SplitString:
Description: “Split a string into a list using a hyphen as the delimiter”
Value: !Fn::Split [”-“, “123-456-789”]
What AWS CloudFormation intrinsic functions are used for encoding data in base64 and string interpolation?
- !Fn::Base64: Encodes data in base64 format. Commonly used for encoding user data in AWS::EC2::Instance resources.
- !Fn::Sub: Performs string interpolation, allowing you to substitute values into strings. ${LogicalResource}
What AWS CloudFormation feature allows you to create a mapping of keys to corresponding values within a template?
- Mappings: A CloudFormation feature that allows you to create a static mapping of keys to corresponding values, providing a way to parameterize templates.
What AWS CloudFormation section allows you to define values to be shown or exported after the stack creation or update?
The optional Outputs section declares output values that you can import into other stacks (to create cross-stack references), return in response (to describe stack calls), or view on the AWS CloudFormation console. For example, you can output the S3 bucket name for a stack to make the bucket easier to find.
What are public parameters in AWS Systems Manager Parameter Store, and how can they be shared across accounts and regions?
- Public parameters in AWS Systems Manager Parameter Store are parameters that can be marked as accessible across accounts and regions.
- They provide a way to share configuration values with other AWS accounts.
- Access to public parameters is controlled by IAM policies.
- Cross-region access is supported, allowing parameters to be used in different AWS regions.
- Resource-based policies can be employed to share public parameters with other AWS accounts.
For more details, refer to: Public Parameters in Systems Manager
In AWS CloudFormation, what feature allows you to control whether resources are created or how they are configured based on certain conditions?
- The optional Conditions section contains statements that define the circumstances under which entities are created or configured.
- You might use conditions when you want to reuse a template that can create resources in different contexts, such as a test environment versus a production environment.
- In your template, you can add an EnvironmentType input parameter, which accepts either prod or test as inputs.
- Conditions are evaluated based on predefined pseudo parameters or input parameter values that you specify when you create or update a stack.
- Within each condition, you can reference another condition, a parameter value, or a mapping.
- After you define all your conditions, you can associate them with resources and resource properties in the Resources and Outputs sections of a template