AWS section 9. Dev theory

  1. What is aws code commit
    Source control service

    Data is encrypted in transit and at rest.

    Tracks an manages code changes, mainatins version histroy etc.
  2. What is aws code deploy
    Automated deployment to EC2 on premises systems and lambda
  3. what is aws code pipeline
    CI/CD workflow tool. Fully automates entire release process. Build deploy test
  4. What is CI/CD
    Best practices for software development and deployment

    Enable frequent changes whilst maintaining service stability.
  5. How does CI work
    Developers make changes to code repository

    Triggers and automated build.

    Test framework
  6. What is continuous delivery
    ITs about automating the build test and deployment functions.
  7. What deployment approaches are there
    in place and blue-green
  8. How does inplace deployment work
    • App is stopped on each instance
    • Latest revision installed
    • Instance out of service (capacity reduced)
    • If instances are behind load balancer, you can configure load balancer to stop sending requrests to the instances being upgraded

    • Also called rolling update
    • Only ued for ec2 and on premis system, no lambda support

    If you need to rollback, previous versions gotta be redeployed.
  9. How does blue green deployment work
    New instances are provisioned and the latest revision is installed on the new instances. 

    Blue is the active deployment, green is the new release

    new instances are registered with and ELB. Traffic is just routed to the new instances. OG instances terminated
  10. Why is bluegreen deployment so good
    Upgrades, They can be created ahead of time.

    Switchin back is easier (if you havent terminated the old ones)
  11. What is a deployment group
    Set of EC2 instances or lambda functions to which a new revision of software is gonna get deployed
  12. Deployment
    Process and componenets used to apply a new revision
  13. Deployment config
    Set of deployment rules as well as success/fail conditions
  14. App spect file
    Defines deployment actions you want aws codedeploy to execute
  15. Revision
    Everythig needed to deploy the new version. App spec file, executables etc
  16. Application
    unique idendifier for application you want to deploy. Ensures the correct combo of revision, deployment config and deployment group
  17. What is the appspec file
    Used to define the params that will be used for codedeploy deployment.

    Its structure varies depending on whether you're deploying to EC2, lambda or on premise.
  18. How are appspec files written if its lambda deployments
    • Version: Reserved for future use
    • Resources: Name and properties of lambda funct to deploy
    • Hooks: Specifies lambda functions to run at set points in the deployment
  19. What hooks can we use in lambda appspec file
    Before allow function

    Afterallow function
  20. how does appspec file look for ec2 and on premises
    • Version: Reserved for future use.
    • OS: Operating system yo're on
    • Files:Location of any files that need to be copied
    • Hooks: Speicfy scripts to be run at set times
  21. Where does the appspec file have to go for EC2 and on premise
    root directory of your revision.
  22. What are the steps to do order of hook for a code-deploy in place -deployment
    Image Upload 1
  23. What is aws code build
    A fully managed build service which runs a set of commands that you define

    eg compiles code, runs tests and produces artifacts that are ready to deploy

    It takes source code form code commit to then build out a docker image
  24. What is docker
    an open source tech whic lets you create apps based on linux or windows containers

    Container is a lightweight standalone software package which has everything the sofwhere needs to run.

    AWS provides elastic container service as a fully managed clustered platform which lets you run your docker images in the cloud
  25. How did faye do the docker thing
    Manually built a docker image from a dockerfile.

    Source code in codecommit was added with buildspec.yml to contain all the manaual commands to build tag and push to elastic container registry. 

    Code build built image. New docker image created. Then visible in ECR.
  26. What are the key dkocker commands
    • docker build
    • docker tag
    • docker push. Pushes to ecr repo.
  27. Can you ovverride the settings in buildspec.yml
    Yes with commands in console

    If build fails, check build logs in codebuild console. Can see in cloudwatch
  28. What is cloudformation?
    Service that lets you manage configure and provision AWS infrastructure as code.
  29. How are resources defined in a cloudformation template
    Use a cloud formation template

    • Supports YAML or JSON. 
    • Its gets interpreted and the API calls are made to create the resources defined
  30. Benefits of cloudformation
    • Infra provisioned consitently
    • Less time and effort than manual 
    • version control possible
    • free to use (only charged for createion)
    • Can be used to manage updates and dependencies
    • Can be used to rollback and delte wholestack
  31. Cloud formation template structure?
    • AWS templateformat
    • description
    • metadata
    • parameters
    • conditions
    • mAPPINGS
    • transform
    • resources - the only mandatory bit
    • outputs
  32. What is SAM?
    Serverless application model.

    Extension to cloudformation used to define serverless apps. So if you want a serverless stakc you can use sam with cloudformation to make life easy.

    Simplified syntax for defining serverless resources: APIs Lambda functions, Dynamo DB tables. etc.

    You can use it to package deployment code, upload it to s3 and deploy serverless application
  33. What is a cloudformation nested stack?
    Allows you to reuse bits of cloudformation code for common use cases.

    EG standard config for load balancer, web server, application server etc.

    Instead of copying out the code each time, you can create a standard template for each common use case and reference from within cloudformation temp.
  34. Whats the most important bit to add into a cloudformation template if you want to have a nested stack?
    • Image Upload 2
    • Its the resource tag with the url for the location of the nested stack.

    You can store it in s3
  35. When deploying application code to lambda, the appspec file can be written in which slanguage
    Json
  36. When deploying applicatio code to ec2, the appspec file can be written in which language
    yaml
Author
keesukim
ID
348106
Card Set
AWS section 9. Dev theory
Description
blah
Updated