Resources – declare the AWS resources to deploy (Mandatory)
Parameters – input values
Mappings – static variables
Outputs – a reference to what was created
Conditional
Transform – include code snippets outside your template
Meta Data
Template Helpers
Functions
References
Stacks
Stack Set – For multi-account and cross-region deployments.
Nested Stacks – make the process of updating stacks easier.
cfn-init
Helper script must be installed
Needs to be called from within the EC2 instance
The call will query the Meta-Data ‘AWS::CloudFormation::Init’ block which defines the script that will be executed.
cfn-signal:
Signals CloudFormation to indicate whether Amazon EC2 instances have been successfully created or updated.
Helper script must be installed
Run after cfn-init
Sends a signal to a WaitCondition whether an action is a success or fail.
Requires a WaitCondition (Defines success or failure) with CreationPolicy
EC2 requires internet access.
CreationPolicy:
Prevent a resource status from reaching create complete until AWS CloudFormation receives a specified number of success signals or the timeout period is exceeded.
Requires cfn-signal to signal a resource
UpdatePolicy
Specify how AWS CloudFormation handles updates on some resources:
3 Update Policies:
AutoScalingReplacingUpdate
AutoScalingRollingUpdate
AutoScalingScheduledAction
DeletionPolicy
Retain
Backup – Only apply to DBs (Default for DB)
Delete (Default for all except DB)
StackPolicies:
After you set a stack policy, all of the resources in the stack are protected by default. To allow updates on specific resources, you specify an explicit Allow statement for those resources in your stack policy.
A stack policy applies only during stack updates.
TerminationProtection:
Prevent a stack from being deleted.
If enabled, must be disabled if stack is needed to be deleted.
Code Commit
OpsWorks
Managed Chef and Puppet
AppSync
Manage service for developing GraphQL APIs
GraphQL APIs built with AWS AppSync give front-end developers the ability to query multiple databases, microservices, and APIs from a single GraphQL endpoint.
Use cases:
Automatically synchronize data between mobile/web applications and the cloud
IoT Dashboard
Real-time Chat
Step Function & SWF (Simple Work Flow)
Both are used for workflow
Step Function is new and prefered than SWF except if the workflow requires human intervention/
Step Function
has a visual tool to design the flow. And the flow is represented as a JSON state machine.
common use cases are to orchestrate: (1) micro-services (lambda), (2) ETL, & (3) machine learning.
The maximum execution time is 1 year.
AWS Backup
Fully managed backup service
Works across the region and across the account
Backup consists of a
a Backup Plan with
one more Backup Rule
backing up one or more Resources (e.g. EFS, EBS)
Resources can include: 1) all in the account, 2) specific resources or 3) based on a tag.