Docsity

AWS Certified Devops Engineer Professional Course DOP-C02, Exams of Nursing

Partial preview of the text

Download AWS Certified Devops Engineer Professional Course DOP-C02 and more Exams Nursing in PDF only on Docsity!

AWS Certified Devops Engineer

Professional Course DOP-C

Domain 1 - SDLC Automation create elastic beanstlak app 1-create app 2-web server env 3-name-env or name-dev or name-prod

4-platform node.js 5-Next 6-skip to review AWS CodeCommit storing our code Private Git repositories

  • No size limit on repositories (scale seamlessly)
  • Fully managed, highly available
  • Code only in AWS Cloud account => increased security and compliance (Developer) John (Developer) push code
  • Security (encrypted, access control...)
  • Integrated with Jenkins, AWS CodeBuild, and other CI tools Version control GitHub, GitLab, Bitbucket Benefits are:
  • Collaborate with other developers
  • Make sure the code is backed-up somewhere
  • Make sure it’s fully viewable and auditable CodeCommit - Security - Authentication
  • SSH Keys – AWS Users can configure SSH keys in their IAM Console
  • HTTPS – with AWS CLI Credential helper or Git Credentials for IAM user

CodeCommit – Cross-Region Replication what is use case? achieve lower latency pulls for global developers, backups CodeCommit – Pull Request Approval Rules Helps ensure? specify? 1-Helps ensure the quality of your code by requiring user(s) to approve the open PRs before the code can be merged 2-Specify a pool of users to approve and number of users who must approve the PR

  • Specify IAM Principal ARN (IAM users, federated users, IAM Roles, IAM Groups) 3-Approval Rule Templates
  • Automatically apply Approval Rules to PRs in specific repositories
  • Example: define different rules for dev and prod branches

aws codebuild features?

- Security:

  • Integration with KMS for?
  • IAM for?
  • AWS CloudTrail for?
  • A fully managed continuous integration (CI) service
  • Continuous scaling (no servers to manage or provision – no build queue)
  • Compile source code, run tests, produce software packages...
  • Alternative to other build tools (e.g., Jenkins)
  • Charged per minute for compute resources (time it takes to complete the builds)
  • Leverages Docker under the hood for reproducible builds
  • Use prepackaged Docker images or create your own custom Docker image - Security:
  • Integration with KMS for encryption of build artifacts
  • IAM for CodeBuild permissions, and VPC for network security
  • AWS CloudTrail for API calls logging

1-codebuild will fetch the code (container will run buildspec.yaml) with prepackaged or custom image 2-you can store some reusable file in s3 bucket 3-logs will be store in amazon S3 , cloudwatch 4-artifact will be store in S3 bucket CodeBuild - buildspec.yml where to place the buildspec? what is • env? what are phases? what is artifact? what is cache?

  • buildspec.yml file must be at the root of your code - env – define environment variables
  • variables – plaintext variables
  • parameter-store – variables stored in SSM Parameter Store
  • secrets-manager – variables stored in AWS Secrets Manager - phases – specify commands to run:
  • install – install dependencies you may need for your build
  • pre_build – final commands to execute before build
  • Build – actual build commands
  • post_build – finishing touches (e.g., zip output)

**- artifacts – what to upload to S3 (encrypted with KMS)

  • cache – files to cache (usually dependencies) to S3 for** future build speedup CodeBuild - Local Build In case of need of deep troubleshooting beyond logs... what to do? run CodeBuild locally on your desktop (after installing Docker) • For this, leverage the CodeBuild Agent CodeBuild - Inside VPC By default, your CodeBuild containers are launched where? whar are Use cases: to have codebuild inside your vpc? outside your VPC but It cannot access resources in a VPC
  • Use cases: integration tests, data query, internal load balancers.. CodeBuild - Environment Variables 2 kinds? - Default Environment Variables
  • Defined and provided by AWS
  • AWS_DEFAULT_REGION, CODEBUILD_BUILD_ARN, CODEBUILD_BUILD_ID, CODEBUILD_BUILD_IMAGE... - Custom Environment Variables

CodeBuild - Build Badges what are Build Badges

  • Dynamically generated badge that displays the status of the latest build
  • Can be accessed through a public URL for your CodeBuild project
  • Supported for CodeCommit, GitHub, and BitBucket
  • Note: Badges are available at the branch level CodeBuild - Triggers how do we trigger a codebuild? CodeBuild - Validate Pull Requests
  • Validate proposed code changes in PRs before they get merged
  • Ensure high level of code quality and avoid code conflicts CodeBuild - Test Reports
  • Contains details about tests that are run during builds - Unit tests , configuration tests , functional tests
  • Create your test cases with any test framework that can create report files in the following format:
  • JUnit XML, NUnit XML, NUnit3 XML
  • Cucumber JSON, TestNG XML, Visual Studio TRX
  • Create a test report and add a Report Group name in buildspec.yml file with information about your tests AWS CodeDeploy Deployment service that automates application deployment Deploy new applications versions to -EC2 Instances,
  • On-premises servers,
  • Lambda functions,
  • ECS Services Automated Rollback capability in case of -failed deployments, or -trigger CloudWatch Alarm Gradual deployment control A file named appspec.yml defines how the deployment happens CodeDeploy - EC2/On-premises Platform - Can deploy to -EC2 Instances & -on-premises servers - Perform -in-place deployments or
  • It can be installed and updated automatically if you’re using Systems Manager •The EC2 Instances must have sufficient permissions to access Amazon S3 to get deployment bundles CodeDeploy - Lambda Platform
  • CodeDeploy can help you automate traffic shift for Lambda aliases
  • Feature is integrated within the SAM framework strategies to make X evolves?
  • Linear: grow traffic every N minutes until 100%
  • LambdaLinear10PercentEvery3Minutes
  • LambdaLinear10PercentEvery10Minutes - Canary: try X percent then 100%
  • LambdaCanary10Percent5Minutes
  • LambdaCanary10Percent30Minutes - AllAtOnce : immediate (jump v1 to v2) CodeDeploy - ECS Platform
  • CodeDeploy can help you automate the deployment of a new ECS Task Definition
  • Only Blue/Green Deployments
  • Linear: grow traffic every N minutes until 100%
  • ECSLinear10PercentEvery3Minutes
  • ECSLinear10PercentEvery10Minutes
  • Canary: try X percent then 100%
  • ECSCanary10Percent5Minutes
  • ECSCanary10Percent30Minutes
  • AllAtOnce: immediate CodeDeploy - In-place Deployment Hooks define hooks? Hooks – one or more scripts to be run by CodeDeploy on each EC instance AWS CodePipeline what is the source? what is the build tool?

CodePipeline - what to use for Troubleshooting? If pipeline can't perform an action? what can be used to audit AWS API calls? Use CloudWatch Events (Amazon EventBridge). Example:

  • You can create events for failed pipelines
  • You can create events for cancelled stages make sure the “IAM Service Role” attached does have enough IAM permissions AWS CloudTrail CodePipeline - Events vs. Webhooks vs. Polling Events are the default and recommended CodePipeline - Action Types Constraints for Artifacts CodePipeline - Manual Approval Stage

CodePipeline - CloudFormation as a Target CloudFormation Deploy Action? CloudFormation StackSets? what are Action Modes? Template Parameter Overrides? CloudFormation Deploy Action can be used to deploy AWS resources use to deploy across multiple AWS accounts and AWS Regions Configure different settings: •Stack name, Change Set name, template, parameters, IAM Role, Action Mode.

  • Action Modes
  • Create or Replace a Change Set, Execute a Change Set
  • Create or Update a Stack, Delete a Stack, Replace a Failed Stack
  • Template Parameter Overrides
  • Specify a JSON object to override parameter values
  • Retrives the parameter value from CodePipeline Input Artifact
  • All parameter names must be present in the template
  • Static - use template configuration file (recommended)
  • Dynamic - use parameter overrides CodePipeline - Best Practices
  • Example: deploy a Lambda function through CloudFormation into multiple regions - S3 Artifact Stores must be defined in each region where you have actions
  • CodePipeline must have read/write access into every artifact buckets
  • If you use the console default artifact buckets are configured, else you must create them - CodePipeline handles the copying of input artifacts from one AWS Region to the other Regions when performing cross-region actions
  • In your cross-region actions, only reference the name of the input artifacts CodePipeline - CloudFormation Integration
  • CREATE_UPDATE - create or update an existing stack
  • DELETE_ONLY - delete a stack if it exists AWS CodeStar manage software development activities in one place connect github to AWS AWS CodeArtifact

store, publish, and share software packages AWS CodeGuru automated code reviews using Machine Learning Continuous Integration (CI) explain de process developer/repo/build,test/developer what are advantages?

  • Developers push the code to a code repository often (e.g., GitHub, CodeCommit, Bitbucket…)
  • A testing / build server checks the code as soon as it’s pushed (CodeBuild, Jenkins CI...)
  • The developer gets feedback about the tests and checks that have passed / failed
  • Find bugs early, then fix bugs
  • Deliver faster as the code is tested
  • Deploy often
  • Happier developers, as they’re unblocked Continuous Delivery (CD) what to ensures?
  • Ensures that the software can be released reliably whenever needed
  • Ensures deployments happen often and are quick