10 IAC DevOps Flashcards

1
Q

Describe the Service Catalog in cloud services.

A

The Service Catalog is a managed collection of products, such as CloudFormation stacks, that can be provisioned on demand.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define OpsWorks and its purpose.

A

OpsWorks is a managed configuration management service that uses Chef and Puppet, ideal for customers transitioning from on-premises environments who are already using these tools.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are Stacks and Layers related in OpsWorks?

A

Stacks are containers of resources, while Layers represent specific functions within a stack, such as load balancing or databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are Recipes and Cookbooks in OpsWorks?

A

Recipes and Cookbooks are applied to layers to run scripts and install applications. Cookbooks can be stored in GitHub.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain the concept of Lifecycle events in OpsWorks.

A

Lifecycle events are hooks that run on layers, such as ‘Setup’ and ‘Deploy’, to manage the lifecycle of resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can the availability of instances be configured in OpsWorks?

A

Instances can be configured to run 24x7, based on a schedule, or when required due to load.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define CloudFormation Templates and their function.

A

CloudFormation Templates define logical resources that are transformed into physical resources by CloudFormation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What role do Parameters play in CloudFormation Templates?

A

Parameters influence logical resources and are defined in the template, allowing for configuration with defaults and validation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe the difference between Template Parameters and Pseudoparameters.

A

Template Parameters are directly set by the user, while Pseudoparameters are automatically provided by CloudFormation, such as AWS::Region and AWS::StackId.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do Intrinsic Functions enhance CloudFormation Templates?

A

Intrinsic Functions allow templates to be dynamic, enabling operations like referencing parameters, retrieving properties, and performing string manipulations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain the purpose of the Ref intrinsic function in CloudFormation.

A

The Ref function points towards parameters and logical resources based on their logical name, allowing for dynamic referencing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the function of Fn::GetAtt in CloudFormation?

A

Fn::GetAtt retrieves properties from other resources defined in the template.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe the use of Fn::Join and Fn::Split in CloudFormation.

A

Fn::Join and Fn::Split are intrinsic functions that perform string operations, allowing for manipulation of string values within templates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does Fn::Select work in CloudFormation?

A

Fn::Select retrieves an item from a list based on its index, commonly used with Fn::GetAZs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

(Removed)

A

Conditional functions, such as Fn::If and Fn::And, are used to conditionally provision resources based on evaluated conditions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain the purpose of Mappings in CloudFormation.

A

Mappings allow for information lookup using key-value pairs, enabling dynamic configuration based on predefined values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the role of Outputs in CloudFormation?

A

Outputs allow stacks to return values that can be referenced in other stacks and viewed within the Console.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How are Conditions evaluated in CloudFormation?

A

Conditions are evaluated as true or false based on intrinsic functions before the Resources section is evaluated, influencing resource creation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Describe the function of DependsOn in CloudFormation orchestration.

A

DependsOn defines dependencies between resources, overriding CloudFormation’s default behavior of updating resources in parallel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Describe the role of a CreationPolicy in AWS CloudFormation.

A

A CreationPolicy is applied to a specific resource in AWS CloudFormation, ensuring that the resource is only marked as CREATE_COMPLETE if a specified number of success signals are received within a timeout period. If the signals are not received, the resource is marked as CREATE_FAILED.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How does a WaitCondition function in AWS CloudFormation?

A

A WaitCondition is a CloudFormation resource that blocks the stack until a specific number of WaitHandles are satisfied. Each WaitHandle generates a pre-signed URL to update its state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Define Nested Stacks in AWS CloudFormation.

A

Nested Stacks are a logical grouping of stacks where the root stack creates other stacks. They allow for template reuse and enable the parent stack to pass parameters down to child stacks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Explain the purpose of Cross-Stack References in AWS CloudFormation.

A

Cross-Stack References allow stacks to use exported outputs from other stacks, with the requirement that the export identifier must be unique per account per region. The Fn::ImportValue function is used to retrieve these exported outputs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How should one decide between using nested stacks and cross-stack references?

A

Nested stacks should be used when resources have a similar lifecycle and for template reuse, while cross-stack references are better for sharing resources across multiple projects, such as a shared VPC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What are StackSets in AWS CloudFormation?

A

StackSets are used to deploy CloudFormation stacks across multiple accounts and regions, containing stack instances that point to stacks created by CloudFormation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Describe the parameters that control behavior in StackSets.

A

Key parameters in StackSets include Concurrent accounts (number of target accounts acted on simultaneously), Failure tolerance (percentage of stack operations that can fail before stopping), Region concurrency (whether to apply changes one region at a time or all at once), and Retain stacks (to keep stacks even when the stack instance is deleted).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

(Removed)

A

If an EC2 instance references a subnet that has not been created, the instance will not be created until the subnet is available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Define the term ‘Outputs’ in the context of Nested Stacks.

A

Outputs in Nested Stacks refer to the values returned from child stacks to the parent stack, which can then be passed to other child stacks.

29
Q

How does a WaitHandle work in conjunction with a WaitCondition?

A

A WaitHandle generates a pre-signed URL that is used to update the state of the WaitCondition, allowing the stack to proceed once the required number of WaitHandles are satisfied.

30
Q

(Removed)

A

The default behavior is to delete stacks along with stack instances.

31
Q

Define deletion policies in CloudFormation.

A

Deletion policies are applied to resources to prevent physical resources from being deleted when the logical resource is deleted, useful for preventing data loss for stateful resources.

32
Q

How do deletion policies help with stateful resources?

A

They prevent data loss by ensuring that resources like EBS volumes and RDS databases are not deleted when the logical resource is deleted.

33
Q

What is the Snapshot behavior in deletion policies?

A

Some resources support a Snapshot behavior that automatically snapshots them before deletion.

34
Q

Explain the role of Stack Roles in CloudFormation.

A

Stack Roles allow CloudFormation to assume a role to manage physical resources, overriding the default permissions of the identity that updated the stack.

35
Q

What permission is required for an identity to use a stack role in CloudFormation?

A

The identity needs the iam:PassRole permission to use the stack role.

36
Q

Describe the purpose of cfn-bootstrap in CloudFormation.

A

cfn-bootstrap is a collection of scripts that allow resources to interact with stacks.

37
Q

How does cfn-init function in CloudFormation?

A

cfn-init is a declarative way to bootstrap instances, running scripts based on the AWS::CloudFormation::Init logical resource.

38
Q

What is the function of cfn-hup in CloudFormation?

A

cfn-hup is a daemon that checks for updates to the Init metadata, allowing UpdateStack to trigger re-initialization of running instances without replacement.

39
Q

Explain the purpose of cfn-signal in CloudFormation.

A

cfn-signal sends a signal to CloudFormation in relation to a CreationPolicy.

40
Q

What are ChangeSets in CloudFormation?

A

ChangeSets preview how resources will be affected when a stack is updated, allowing changes to be reviewed before committing.

41
Q

Define Custom Resources in CloudFormation.

A

Custom Resources implement custom logical resource types, with CloudFormation sending events to an endpoint for the custom resource.

42
Q

How do Custom Resources communicate with CloudFormation?

A

Handles respond to CloudFormation using the pre-signed ResponseURL.

43
Q

Describe Elastic Beanstalk in the context of AWS.

A

Elastic Beanstalk is a platform-as-a-service (PaaS) offering where the customer provides the code, and AWS manages the infrastructure.

44
Q

What are the types of platforms supported by Elastic Beanstalk?

A

There are built-in languages, Docker (single container or multi-container), and pre-configured Docker for languages not natively supported.

45
Q

Give examples of built-in languages supported by Elastic Beanstalk.

A

Examples include Python, Java, .NET Core (Linux), and .NET (Windows).

46
Q

What is the significance of Docker in Elastic Beanstalk?

A

Docker allows for single or multi-container applications and includes pre-configured Docker for unsupported languages.

47
Q

How does Elastic Beanstalk handle unsupported languages?

A

It uses pre-configured Docker to implement languages that are not yet natively supported.

48
Q

Describe the purpose of a docker-compose.yml file.

A

It is used to orchestrate multi-container applications in Docker.

49
Q

Define what an application refers to in the context of deployment.

A

An application collectively refers to both the code and configuration of a project. One application can have multiple environments

50
Q

How are application versions stored for deployment?

A

Application versions are stored in S3 as specific labeled versions of source bundles, which can be in .zip or .war format.

51
Q

Explain the role of environments in Elastic Beanstalk.

A

Environments provision infrastructure to run a specific application version and are assigned an environment tier, either web server tier or worker tier.

52
Q

What is a CNAME swap and its purpose?

A

A CNAME swap is used to switch traffic between environments, performing a cut-over from one environment to another.

53
Q

How should databases be managed in relation to Elastic Beanstalk (EB) environments?

A

Databases should be managed outside EB to avoid data issues when switching environments, although RDS databases can be created from an environment.

54
Q

List the environment variables injected into an application when a database is added to an environment.

A

The environment variables are: RDS_HOSTNAME, RDS_PORT, RDS_DB_NAME, RDS_USERNAME, and RDS_PASSWORD.

55
Q

Describe the ‘All at Once’ deployment policy.

A

The ‘All at Once’ deployment policy updates all instances at once, which causes downtime.

56
Q

In Elastic Beanstalk, what is the difference between ‘Rolling’ and ‘Rolling with Additional Batch’ deployment policies?

A

‘Rolling’ deploys in batches without maintaining capacity, while ‘Rolling with Additional Batch’ provisions additional instances to maintain capacity throughout the process.

57
Q

Define the ‘Immutable’ deployment policy.

A

The ‘Immutable’ deployment policy provisions a separate set of instances in a temporary Auto Scaling Group (ASG) and adds them to the main ASG once they are ready.

58
Q

Explain the purpose of the .ebextensions folder in a source bundle.

A

The .ebextensions folder customizes the environment, allowing configuration files to be added that end in .config.

59
Q

In Elastic Beanstalk, how does the ‘Traffic Splitting’ deployment policy work?

A

The ‘Traffic Splitting’ policy launches new instances in a temporary ASG and progressively cuts over traffic to these new instances.

60
Q

What is the function of cloning in the context of environments?

A

Cloning creates a new environment based on an existing environment, copying all settings across.

61
Q

Describe how CloudFormation templates can be used with Elastic Beanstalk.

A

CloudFormation templates in JSON or YAML format can be added to customize the stack generated by Elastic Beanstalk.

62
Q

Describe the phases of a CodeBuild job.

A

The phases of a CodeBuild job include DOWNLOAD_SOURCE, INSTALL, PRE_BUILD, BUILD, POST_BUILD, and FINALIZING. If DOWNLOAD_SOURCE, INSTALL, or PRE_BUILD fails, it will short circuit to FINALIZING. If the job reaches BUILD, all successive phases are used, even if some fail. FINALIZING is only skipped if PROVISIONING fails.

63
Q

Define the purpose of the buildspec in CodeBuild.

A

The buildspec defines the commands for the various phases of a CodeBuild job, which include install, pre_build, build, and post_build.

64
Q

What action types does CodePipeline support?

A

CodePipeline supports six types of actions: Source, Build, Test, Deploy, Approval, and Invoke.

65
Q

Explain the rollback feature in CodePipeline.

A

The rollback feature in CodePipeline allows earlier executions of a stage to be performed again.

66
Q

What happens if the FINALIZING step is skipped in a CodeBuild job?

A

The FINALIZING step is only skipped if the PROVISIONING phase fails.

67
Q

List the phases that can cause a CodeBuild job to short circuit to FINALIZING.

A

The phases that can cause a CodeBuild job to short circuit to FINALIZING are DOWNLOAD_SOURCE, INSTALL, and PRE_BUILD.

68
Q

How does the success of the BUILD phase affect subsequent phases in CodeBuild?

A

If the job reaches the BUILD phase, all successive phases (POST_BUILD and FINALIZING) are used, even if some of them fail.

69
Q

Describe the types of actions supported by CodePipeline.

A

CodePipeline supports six types of actions: Source, Build, Test, Deploy, Approval, and Invoke.