# AWS Service Summarize CodeCommit: 코드를 형상 관리 저장소에 저장함. 코드를 여러 브랜치로 관리할 수 있음. CodeBuild: CICD 파이프라인에서 온디맨드로 코드를 빌드하고 테스트함. CodeDeploy: 코드를 EC2, ASG, Lambda, ECS에 배포함. CodePipeline: CICD 파이프라인을 오케스트레이션함. CodeCommit을 소스로 사용할 경우, 브랜치마다 파이프라인을 생성해야 함. CloudSearch: 애플리케이션을 위한 전문 검색, 자동완성 기능 등을 지원하는 검색엔진 솔루션 Alexa for Business: Alexa를 사용해 회의실 및 사무실에서 생산성을 향상시킬 수 있도록 지원 Lex: 음성을 텍스트로 자동 변환하는 자동 음성 인식(ARS) 기능 지원. 챗봇 구축에 유용함 Connect: 전화를 수신하고 고객 응대 흐름을 생성하는 클라우드 기반의 가상 콜 센터 Rekognition: 머신 러닝을 통해 이미지 또는 비디오에서 객체, 사람, 장면, 텍스트를 식별 Kinesis Video Stream: 비디오 장치당 하나의 스트림 데이터를 수신하고 EC2 인스턴스 또는 Rekognition을 사용해 분석함. WorkSpaces: 주문형 Windows 워크스테이션. 애플리케이션 관리에는 WAM을 사용함. AppStream 2.0: 데스크톱 애플리케이션을 웹 브라우저로 스트리밍하는 서비스 Mechanical Turk: 단순 인력 작업 수행을 위한 크라우드소싱 마켓플레이스. SWF와 연동되어 있음. Device Farm: 실제 장치에서 모바일 또는 웹 애플리케이션을 테스트할 수 있도록 도와주는 애플리케이션 테스트 서비스 # CI / CD ## Continuous Integration (CI) ![[Screenshot 2024-05-29 at 8.48.52.png]] > 개발자가 코드 저장소에 자주 Push 하는 환경을 만들어 주는 것(코드를 끊임 없이 테스트함으로써 SW 개발 및 배포 속도를 향상 시킬 수 있음) - Developers push the code to a code repository often (GitHub / CodeCommit / Bitbucket / etc...) - A testing / build server checks the code as soon as it’s pushed (CodeBuild / Jenkins CI / etc...) - The developer gets feedback about the tests and checks that have passed / failed - Find bugs early, fix bugs - Deliver faster as the code is tested - Deploy often - Happier developers, as they’re unblocked ## Continuous Delivery ![[Screenshot 2024-05-29 at 9.15.28.png]] > SW가 언젠든지 안정적으로 릴리스 될 수 있도록 해 줌 -> 버전을 더 자주 배포함으로써 빠르게 릴리스 할 수 있도록 - Ensure that the software can be released reliably whenever needed. - Ensures deployments happen often and are quick - Shift away from “one release every 3 months” to ”5 releases a day” - That usually means automated deployment - CodeDeploy - Jenkins CD - Spinnaker - Etc... ## Technology Stack for CICD ![[Screenshot 2024-05-29 at 9.20.54.png]] > 동작 방식 > Code : AWS CodeCommit(코드 저장소) or GitHub or 3rd Party code repository > Build and Test : AWS CodeBuild(빌드 하는데 시간 제한이 없음), Jenkins CI or 3rd party CI servers > Deploy : AWS CodeDeploy > Provision : User Managed EC2 Instances Fleet (CloudFormation - 직접 관리) > Deploy and Provision : AWS Elastic Beanstalk(인프라를 provisioning 가능, EC2 Instance에 Application을 점진적으로 배포하는 것이 가능함) > Orchestrate : AWS CodePipeline ## CICD Architecture ![[Screenshot 2024-05-29 at 9.23.19.png]] > DEV Branch와 Prod Branch가 있을때 Branch당 코드의 한 버전으로 다른 Branch와 서로 독립되어 있다 > 이때 Dev branch에서 코드를 수정을 했을 경우 변경 사항을 Prod branch로 병합 > CodeBuild는 CodeCommit의 dev Branch에서 코드를 가져옴 > CodeDeploy는 빌드된 버젼은 Beanstalk에 배포 > 이후 Elastic Beanstalk의 개발 환경 상태를 확인한 다음 문제가 없으면(Application에 문제가 없음) > pull를 요청해 Prod branch에 병합 > 중요한점 : CodeCommit 저장소의 Branch마다 Code Pipeline을 만들어야한다. ## CodeCommit Trigger for AWS Lambda ![[Screenshot 2024-05-29 at 9.29.35.png]] > 위의 그림에서 처럼 CodeCommit에 Code를 Push 했을때 AWS 자격 증명 유출을 탐지하여 자동으로 Puch를 막아 문제를 예방하는 것이 가능(IAM Access Key를 disable하게, SNS Topic으로 관리자가 알 수 있게) ## Good to know - CICD - You can use a <font color="#e36c09">manual approval stage</font> in CodePipeline - 수동 승인 단계 사용 가능(단위 테스트도 가능) ![[Screenshot 2024-05-29 at 9.33.55.png]] - Running unit tests CodeCommit + CodeBuild + Code Pipeline ![[Screenshot 2024-05-29 at 9.34.46.png]] - Build and Store Docker Images: CodeBuild + ECR - 도커 이미지를 자동으로 빌드하고 저장 가능 - Automated CloudFormation deployment: CodePipeline ## CodePipeline - GitHub integration ![[Screenshot 2024-05-29 at 9.37.46.png]] > CodePipeline이 GitHub 저장소의 변경 사함을 주기적으로 확인 하는 방법 ![[Screenshot 2024-05-29 at 9.38.31.png]] > GitHub Application의 CodeStart Source Connection 을 연결하여 자동으로 모든 내용이 CodePipeline쪽으로 전달 가능 # Amazon CodeGuru ![[Screenshot 2024-05-29 at 9.48.50.png]] > CodeGuru는 자동화 된 코드 리뷰와 어플리케이션 성능 최적화에 중점을 둔 서비스 - An ML-powered service for <font color="#e36c09">automated code reviews</font> and <font color="#e36c09">application performance recommendations</font> - Provides two functionalities - <font color="#e36c09">CodeGuru Reviewer</font>: automated code reviews for static code analysis (development) - <font color="#e36c09">CodeGuru Profiler</font>: visibility/recommendations about application performance during runtime (production) - 비용이 가장 많이 드는 코드를 감지해 최적화 방안을 마련, ## CodeGuru Reviewer ![[Screenshot 2024-05-29 at 9.51.37.png]] > 코드를 푸시 할 떄마다 잘못 될 가능성이 있는 코드의 줄을 알려줌(치명적인 문제, 보안 취약점, 찾기 어려운 버그) - Identify critical issues, security vulnerabilities, and hard-to-find bugs - Example: common coding best practices, resource leaks, security detection, input validation - Uses Machine Learning and automated reasoning - Hard-learned lessons across millions of code reviews on 1000s of open-source and Amazon repositories - Supports Java and Python - Integrates with GitHub, Bitbucket, and AWS CodeCommit ## Amazon CodeGuru Profiler ![[Screenshot 2024-05-29 at 9.55.10.png]] > Application 운영 환경, 생산 전 환경에 있을 때 앱의 실행 시 동작을 파악하게 해줌 - Helps understand the runtime behavior of your application - Example: identify if your application is consuming excessive CPU capacity on a logging routine - Features: - Identify and remove code inefficiencies - Improve application performance (e.g.,reduceCPU utilization) - Decrease compute costs - Provides heap summary (identify which objects using up memory) - Anomaly Detection - Support applications running on AWS or on-premise - Minimal overhead on application # Alexa for Business, Lex & Connect - <font color="#e36c09">Alexa for Business</font>: - Use Alexa <font color="#92cddc">to help employees be more productive in meeting rooms and their desk</font> - Measure and increase the utilization of meeting rooms in their workplace - <font color="#e36c09">Amazon Lex</font>: (same technology that powers Alexa) - Automatic Speech Recognition (ASR) to convert speech to text - Natural Language Understanding to recognize the intent of text, callers - <font color="#92cddc">Helps build chatbots, call center bots</font> - <font color="#e36c09">Amazon Connect</font>: - Receive calls, create contact flows, cloud-based virtual contact center - Can integrate with other CRM(Customer Relationship Management) systems or AWS ![[Screenshot 2024-05-29 at 10.00.38.png]] # Kinesis Video Streams ![[Screenshot 2024-05-29 at 10.09.54.png]] > Streaming 장치 하나당, Kinesis Video Stream을 가지고, S3에 저장 시킴 ( Stream Data를 직접 S3로 출력 시킬 수 없다 ) - 이후 영상 분석에 활용 가능 - One video stream per streaming device (producers) - Security cameras, body worn camera, smartphone - Can use a KinesisVideo Streams Producer library - Underlying data is stored in S3 (but we don’t have access to it) - <font color="#e36c09"><u>Cannot</u></font> output the stream data to S3 (must build custom solution) - Consumers: - Consumed by EC2 instances for real time analysis, or in batch - Can leverage the KinesisVideo Stream Parser Library - Integration with AWS Rekognition for facial detection # Amazon WorkSpaces ![[Screenshot 2024-05-29 at 10.50.42.png]] > WorkSpace 말 처럼, AWS에 의해 관리 되어지고 보안이 된 Desktop을 하나 제공해는 서비스이다. > VDI(Virtual Desktop Infrastructure)에서 관리 작업을 생략하는 것이 가능 - Managed, Secure Cloud Desktop - Great to eliminate management of on-premisesVDI (Virtual Desktop Infrastructure) - Pricing is either on-demand (pay per hour) or monthly subscription - Secure, Encrypted, Network Isolation - Integrated with Microsoft Active Directory - <font color="#e36c09">WorkSpaces Application Manager (WAM)</font> - Deploy and Manage applications as virtualized application containers - <font color="#92cddc">Application을 가상화된 Application container로 배포 및 관리 하기 위한 도구</font> -> 모든 작업 공간에 배포하기 위해 - Provision at scale, and keep the applications updated using WAM - Window update와 다름 - <font color="#e36c09">Windows Updates</font> - By default, Amazon <font color="#92cddc">Workspaces are configured to install software updates</font> - Amazon WorkSpaces with Windows will have Windows Update turned on - You have full control over the Windows Update frequency - <font color="#e36c09">Maintenance Windows</font> - <font color="#92cddc">Updates are installed during maintenance windows (you define them)</font> - Always On WorkSpaces: default is from 00h00 to 04h00 on Sunday morning - AutoStop WorkSpaces: automatically starts once a month to install updates - Manual maintenance: you define your windows and perform maintenance ## Cross Region Redirection ![[Screenshot 2024-05-29 at 11.02.56.png]] > WorkSpaces Directory를 여러 리전에서 실행하는 것이 목적(Primary Region, Failover Region) > Primary Region에 AWS Managed Microsoft AD(사용자 정보를 저장하고 작업 공간을 접속할 수 있는 세션을 열어줌)를 설치 > Failover Region에는 <u>AD Connector</u>(왜 Microsoft AD가 아닌 AD Connector를 설치를 하는 이유는 AWS에서 Multi-Region을 지원을 하지 않기 때문)를 설치 및 Microsoft AD와 연결 > 두 개의 Region에 있는 connect alias를 설정하기 위해 Route 53에 레코드 설정(`desktop.example.com`) > Primary Region에 문제가 없을때는 WorkSpace에 접속했을 때 text record를 주고 받음 > Health check or Alarm을 통해 문제가 발생시 Alias에 connection 가능 > 사용자가 한쪽 리전에 연결해도 User data가 공유하는 것은 아님 - WorkDocs를 통해 데이터 공유 가능 ## IP Access Control Groups ![[Screenshot 2024-05-29 at 11.28.06.png]] > 사용자가 연결할 수 있는 IP 주소 및 CIDR 주소 범위를 지정하여 Access를 허용이 가능 - <font color="#92cddc">Similar to security groups for Amazon WorkSpaces</font> - List of IP addresses / CIDR address ranges that users are authorized to connect from - If users access WorkSpaces through VPN or NAT, the IP Access Control Group must authorize the public IP of these # Amazon AppStream 2.0 ![[Screenshot 2024-05-29 at 15.10.40.png]] > Desktop Application을 Web browser에 Streaming 해주는 서비스 - Desktop Application Streaming Service - Deliver to any computer, without acquiring, provisioning infrastructure - <font color="#e36c09">The application is delivered from within a web browser</font> ## Amazon AppStream 2.0 vs WorkSpaces - <font color="#e36c09">Workspaces</font> - <font color="#92cddc">Fully managed VDI </font>and desktop available - The users connect to the VDI and open native or WAM applications - <font color="#76923c">Workspaces are on-demand or always on</font> - <font color="#e36c09">AppStream 2.0</font> - <font color="#92cddc">Stream a desktop application to web browsers</font> (no need to connect to aVDI) - Works with any device (that has a web browser) - <font color="#76923c">Allow to configure an instance type per application type (CPU, RAM, GPU)</font> ## AWS Device Farm ![[Screenshot 2024-05-29 at 16.03.10.png]] > Mobile device and web application에 대한 application test services를 제공 - 실제 브라우저와 실제 원하는 모바일 장치에서 실행 가능 - Application testing service for your mobile and web applications - Test across <font color="#e36c09">real browsers</font> and <font color="#e36c09">real mobiles devices</font> - <font color="#e36c09">Fully automated</font> using framework - Improve the quality of web and mobile apps - Generates videos and logs to document the issues encountered - Can <font color="#e36c09">remotely log-in</font> to devices for debugging - 장치 원격 로그인 지원 # Amazon Macie ![[Screenshot 2024-05-29 at 16.08.36.png]] > Macie는 머신 러닝과 패턴 매칭을 사용해 AWS의 민감한 데이터(개인 식별정보 - PII (민증 같은)) 식별하고 경고 메시지를 보냄 - Amazon Macie is a fully managed data security and data privacy service that uses <font color="#e36c09">machine learning and pattern matching to discover and protect your sensitive data in AWS.</font> - Macie helps identify and alert you to <font color="#e36c09">sensitive data, such as personally identifiable information (PII)</font> # Amazon SES > 이메일을 안전하게 널리 대량으로 전송하기 위한 서비스 - <font color="#e36c09">Fully managed service to send emails securely, globally and at scale</font> - Allows inbound/outbound emails - Reputation dashboard, performance insights, anti-spam feedback - Provides statistics such as email deliveries, bounces, feedback loop results, email open - Supports DomainKeys Identified Mail (DKIM) and Sender Policy Framework (SPF) - Flexible IP deployment: shared, dedicated, and customer-owned IPs - 공유 IP, 전용 IP, 고객 소유 IP를 지정해 해당 IP 주소에서 이메일을 보낼 수 있다. - Send emails using your application using AWS Console, APIs, or SMTP - Use cases: transactional, marketing and bulk email communications ## Configuration Sets ![[Pasted image 20240529173238.png]] > Configuration Sets(구성 세트) : 이메일 전송 이벤트를 지정하고 분석하는데 사용 가능 > - 이벤트 대상 > 1. Kinesis Data Firehose - 전송률, 수신 확인률, 클릭률, 반송률, 수신 거부율, 등의 지표를 수집 > 2. SNS : 반송이나 수신 거부에 대한 즉각적인 피드백을 받을 수 있음 > - IP 풀 관리 : IP 풀을 사용해 이메일을 유형별로 전송하기 위함 - Configuration sets help you customize and analyze your email send events - <font color="#e36c09">Event destinations</font>: - Kinesis Data Firehose: receives metrics (numbers of sends, deliveries, opens, clicks, bounces, and complaints) for each email - SNS: for immediate feedback on bounce and complaint information - <font color="#e36c09">IP pool management</font>: use IP pools to send particular types of emails - 위의 그림에서 Kinesis Data FireHouse에서 Kinesis Data Analytics로 분석 가능 # Amazon Pinpoint # EC2 Image Builder ![[Screenshot 2024-05-29 at 18.39.45.png]] > Virtual Machines or Container Image 생성을 자동화하기 위한 서비스 (생성, 관리, 검증, 및 테스트 자동화 가능) > 예약 실행도 가능 - (매주 이미지를 빌드, 패키지가 업데이트 될 때마다 빌드 하거나 할 수도 있음) > EC2 Image Builder에 만든 AMI는 Multiple regions and multiple account에서 사용 가능 - Used to automate the creation ofVirtual Machines or container images - => Automate the creation, maintain, validate and test EC2 AMIs - Can be run on a schedule (weekly, whenever packages are updated, etc...) - Free service (only pay for the underlying resources) - Can publish AMI to multiple regions and multiple accounts - 순서 : create -> Builder EC2 Instance(빌드 명령어로 만들어지고 조정하는 단계의 EC2 Instance) -> New AMI -> Test EC2 Instance ## EC2 Image Builder - CICD Architecture ![[Screenshot 2024-05-29 at 18.41.50.png]] > EC2 Image Builder와 CI/CD Architect 간 결합해서 어떻게 Instance를 교체하는지 1. CodePipeline 내에서 AWSCommit을 통해 소스 코드를 가져오고, AWS CodeBuild에서 코드가 Build 됨 2. 실행 파일이 생기면 AMI에 Build 이때 EC2 Instance Builder 서비스가 시작 및 실행 3. 검증이 끝마친 AMI은 Auto Scaling에 있는 기존의 Instance와의 교체를 위해 Rolling update를 시작 # AWS IoT Core ![[Screenshot 2024-05-29 at 18.49.45.png]] > 사물 인터넷에서 몇 조개 까지하는 데이터를 수집하여 AWS Cloud에 연결 가능(Severless) - 이후 분석 툴을 이용가능 - IoT stands for “Internet of Things” – the network of internet-connected devices that are able to collect and transfer data - AWS IoT Core allows you to <font color="#e36c09">easily connect IoT devices to the AWS Cloud</font> - <font color="#e36c09">Serverless, secure & scalable</font> to billions of devices and trillions of messages - Integrates with a lot of AWS services (Lambda, S3, SageMaker, etc.) - Build IoT applications that gather, process, analyze, and act on data ## IoT Core Integrations ![[Screenshot 2024-05-29 at 18.51.14.png]] > MQTT Protocol로 받은 IoT Topic에 SNS Topic과 비슷하게 사용이 가능 이후 Kinesis, DynamoDB, SQS, MSK, SNS, S3, AWS Lambda ## IoT Core - Kinesis Data Firehose ![[Screenshot 2024-05-29 at 18.51.46.png]] > Kinesis Data Firehose와 연결하여 S3, Redshift, OpenSerarch로 가는것이 가능