반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형

지난 수요일인가 부터 AWS 요금이 꾸준히 부과 되고 있었다.

하루에 1달러가 채 안 되지만 쓰지도 않는데 계속 부과 되서 신경이 쓰였다.

도대체 내가 수요일에 뭘 했길래...

 

그래서 주말에 자세히 살펴 봤다.

 

 

5월 18일 오후 3시 44분. 총액은 5.38달러이다.

 

 

5월 19일 일요일 3시 56분. 거의 24시간 만에 총액은 6.28 달러가 됐다.

Elastic Compute Cloud 를 expand 해서 봤더니 NAT Gateway hour 부분 액수가 증가했다.

 

이제 어디서 부과 되는지 알아냈으니 그걸 de-activate 시키면 될 일.

EC2 - Elastic IPs로 갔더니 NAT Gateway 가 하나 running 중이었다.

 

내가 이걸 수요일에 만들었었나?

전혀 기억이 안나지만 어쨌든 내가 만들었으니 생겼겠지....

 

그래서 그걸 선택하고 Detach를 시도했다.

근데 이런 에러메세지만 나오고 Detach는 거절 당했다.

 

"Error detaching network interface eni--------------: You are not allowed to manage 'ela-attach' attachments."

 

암만 시도해도 안되길래 AWS Support center에 질문을 올렸다.

월요일 아침에 바로 답장이 왔다.

 

 

아마존은 배달만 빠른줄 알았더니 문의에 대한 응답도 1일 배송이었다.

 

Hi there,

I hope you are having a great day.

I understand that you have some charges for NAT Gateway on your AWS account, I'm happy to assist.

1. How can I stop the service?

You can delete a NAT gateway using the Amazon VPC console by following the steps below.

1.  Log into your Amazon VPC console: https://console.aws.amazon.com/vpc/ 
2.  In the navigation pane, choose NAT Gateways.
3.  Select the NAT gateway, and then choose Delete NAT Gateway.
4.  In the confirmation dialog box, choose Delete NAT Gateway.

After you've deleted a NAT gateway, its entry remains visible in the Amazon VPC console for a short while (usually an hour), after which it's automatically removed. You cannot remove this entry yourself.

More information on NAT Gateway can be found here:

https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html 

It's important to note that deleting a NAT gateway disassociates its Elastic IP address, but does not release that Elastic IP address from your AWS account. You will incur charges for any Elastic IP address that remains allocated to your account, but is not associated with an instance.

We recommend you release a disassociated Elastic IP address from your account if you no longer need it. To release an Elastic IP address:

1.  Open the Amazon VPC console at: https://console.aws.amazon.com/vpc/ .
2.  In the navigation panel, choose Elastic IPs.
3.  Select the Elastic IP address you wish to release, choose Actions, and then choose Release addresses.
4.  When prompted, choose Release.

To learn more about Elastic IP addresses, please follow the link below:

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-eips.html 

2. When (and How) did I created the service?  (I don't remember when and how I created it.

After reviewing your AWS account, I could see that this Nat Gateway was created on May 15, 2019. I've added a report so you can see that the charges started on May 15th.

We do not have the information on how it was created but this documentation can be helpful to you.

https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating 

I hope this information helps, but please let us know if you need any additional assistance.

To see the file named 'Nat Gateway.xlsx' included with this correspondence, please use the case link given below the signature.

Best regards,

Mariano S.
Amazon Web Services

Check out the AWS Support Knowledge Center, a knowledge base of articles and videos that answer customer questions about AWS services: https://aws.amazon.com/premiumsupport/knowledge-center/?icmpid=support_email_category 

We value your feedback. Please rate my response using the link below.
===================================================

To contact us again about this case, please return to the AWS Support Center using the following URL:

https://console.aws.amazon.com/support/home#/case/?displayId=6086834221&language=en 

(If you are connecting by federation, log in before following the link.)

*Please note: this e-mail was sent from an address that cannot accept incoming e-mail. Please use the link above if you need to contact us again about this same issue.

====================================================================
Learn to work with the AWS Cloud. Get started with free online videos and self-paced labs at 
http://aws.amazon.com/training/ 
====================================================================

Amazon Web Services, Inc. and affiliates

 

 



봤더니 NAT Gateway는 EC2가 아니라 VPC로 가서 Delete를 해 줘야 하는 거였다.

VPC - NAT Gateways - 선택 후 Delete

 

간단했다.

 

메일에서 추천한대로 Elastics IPs 로 가서 해당 Elastic IP address를 release 했다.

 

이걸로 사용도 하지 않는 Paid AWS Service 때문에 요금이 부과 되는 상황은 중지 시킨거 같다.

내일 확실히 확인해 봐야지.

 

지난주 시작했던 DeepRacer 공부나 계속 이어가야 겠다.

 

 

 

반응형


반응형

Introduction to reinforcement learning

 

Developers, start your engines!

This guide will walk you through the basics of reinforcement learning (RL), how to train an RL model, and define the reward functions with parameters.

With this knowledge, you’ll be ready to race in the 2019 AWS DeepRacer League.

 

 

https://d2k9g1efyej86q.cloudfront.net/

 

Introduction to Reinforcement Learning

 

d2k9g1efyej86q.cloudfront.net

 

(RL)Reinforcement learning (RL)은 기계 학습 machine learning의 한 유형으로, agent가 원하는 임무를 어떻게 수행할 것인가를 배우기 위해 주어진 환경environment 을 탐구하는 것입니다. 좋은 결과를 위한 액션을 취하고 나쁜 결과를 초래하는 액션은 회피함으로서 원하는 임무에 최적화 된 행동을 학습하게 됩니다.  

reinforcement learning 모델은 경험을 통해 배우며 시간이 지남에 따라 어떤 행동이 최상의 보상reward으로 이어질지 식별 할 수 있게 됩니다.

 

다른 타입의 machine learning

 

Supervised learning

예제 중심 교육 - 주어진 입력들에 대해 알려진 출력들에 대한 레이블된 데이터를 가지고 이 모델은 새로운 입력에 대한 출력을 예측하도록 훈련됩니다. 

 

Unsupervised learning

추론 기반 교육 - 알려진 출력이 없는 레이블된 데이터를 가지고 이  모델은 입력 데이터 내의 관련 구조 또는 유사한 패턴을 식별하도록 훈련됩니다.

 

How does AWS DeepRacer learn to drive by itself?

 

In reinforcement learning, an agent interacts with an environment with an objective to maximize its total reward.

The agent takes an action based on the environment state and the environment returns the reward and the next state. The agent learns from trial and error, initially taking random actions and over time identifying the actions that lead to long-term rewards.

Let's explore these ideas and how they relate to AWS DeepRacer.

 

reinforcement learning에서 agent 는 환경environment 과 상호 작용하여 총 보상reward을 최대화합니다.

agent 는 환경environment  상태state 에 따라 조치를 취하고 환경environment  은 보상reward과 다음 상태state 를 반환합니다. 에이전트agent 는 초기에 무작위로 행동을 취하고 시간이 지남에 따라 장기 보상long-term rewards으로 이어지는 행동을 식별함으로써 이러한 시행 착오를 통해 학습합니다.

이런 각각의 개념들을 살펴보고 AWS DeepRacer와의 관계에 대해서도 알아보겠습니다.

Agent

The agent simulates the AWS DeepRacer vehicle in the simulation for training. More specifically, it embodies the neural network that controls the vehicle, taking inputs and deciding actions.

 

에이전트agent 는 훈련을 하기 위해 시뮬레이션에서 AWS DeepRacer 차량을 시뮬레이트 합니다. 보다 구체적으로, 차량을 제어하고 입력을 취하고 행동을 결정하는 신경망을 구현합니다.

 

Environment

The environment contains a track that defines where the agent can go and what state it can be in. The agent explores the envrionment to collect data to train the underlying neural network.

 

환경environment 은 에이전트agent 가 어디로 갈 수 있고 어떤 상태에 놓일 수 있는 지에 대해 정의하는 트랙으로 구성됩니다.  에이전트는 기본 신경 네트워크를 훈련하기 위해 주어진 환경(트랙)을 탐색하면서 데이터를 수집합니다.

 

State

A state represents a snapshot of the environment the agent is in at a point in time.

For AWS DeepRacer, a state is an image captured by the front-facing camera on the vehicle.

 

상태state 는 특정 시점에 에이전트가있는 환경의 스냅 샷을 가리킵니다.
AWS DeepRacer의 경우 상태는 차량의 전면 카메라가 캡처 한 이미지입니다.

 

Action

An action is a move made by the agent in the current state. For AWS DeepRacer, an action corresponds to a move at a particular speed and steering angle.

 

동작action 은 현재 상태에서 agent가 수행 한 동작입니다. AWS DeepRacer의 경우 동작은 특정 속도 및 방향(핸들) 각도 등의 움직임과 관계된 액션을 말합니다. 

 

Reward

The reward is the score given as feedback to the agent when it takes an action in a given state.

In training the AWS DeepRacer model, the reward is returned by a reward function. In general, you define or supply a reward function to specify what is desirable or undesirable action for the agent to take in a given state.

 

보상reward은 어떤 주어진 상태에서 action를 취했을 때 agent 에게 피드백으로 주어지는 점수입니다.

AWS DeepRacer 모델을 교육 할 때 보상reward reward function에 의해 반환됩니다. 일반적으로 agent 가 주어진 상태에서 취할 수있는 바람직하거나 바람직하지 않은 작업을 지정하기 위해 보상 기능을 정의하거나 제공합니다.

 

 

 

훈련은 반복적 인 과정입니다. 시뮬레이터에서 에이전트는 환경을 탐색하고 경험을 쌓습니다. 수집 된 경험은 신경망을 주기적으로 업데이트하는 데 사용되며 업데이트 된 모델은 더 많은 경험을 생성하는 데 사용됩니다.

 

AWS DeepRacer를 사용하여 자율 운전을 위한 차량을 교육합니다. 교육 과정을 시각화하는 것이 까다로울 수 있으므로 간단한 예를 살펴 보겠습니다.

 

 

이 예에서는 출발점에서 결승점까지 차량이 최단 경로로 갈 수 있도록 훈련시키려고 합니다.

 

우리는 환경environment 을 사각형 격자로 단순화했습니다. 각 사각형은 개별 상태를 나타내며, 목표 방향으로 차량을 위 또는 아래로 움직일 수 있습니다.

 

 

grid 내의 각 격자(사각형)마다 점수를 할당 할 수 있습니다. 그럼으로서 어떤 행동에 인센티브를 줄지 결정할 수 있게 됩니다. 

 

여기서 우리는 트랙의 가장자리에있는 사각형들을 "정지 상태 stop states"로 지정하여 차량이 트랙에서 벗어 났음을 알립니다.

 

우리가 트랙의 중심을 주행하는 법을 배울 수 있게 하도록 차량에 인센티브를 부여하기를 원하기 때문에 센터 라인의 사각형에 높은 보상reward 을 설정하고 다른 곳에는 보다 낮은 보상reward 을 설정합니다.

 

An episode

In reinforcement training, the vehicle will start by exploring the grid until it moves out of bounds or reaches the destination.

 

As it drives around, the vehicle accumulates rewards from the scores we defined. This process is called an episode.

In this episode, the vehicle accumulates a total reward of 2.2 before reaching a stop state.

 

reinforcement training은 여기서 차량이 grid 를 탐색하기 시작하여 경계를 벗어나거나 목적지까지 도달하면 일단락 하게 됩니다.

 

차량이 움직이게 되면 우리가 지정한 점수에 따라 rewards 가 점점 쌓이게 됩니다. 이러한 과정을 에피소드라고 합니다. 위 에피소드에서 이 차량이 stop state에 도달하기 까지 총 2.2 점의 reward 를 쌓았습니다.  

 

Iteration

Reinforcement learning algorithms are trained by repeated optimization of cumulative rewards.

 

Reinforcement learning algorithms은 누적된 rewards를 최적화 (최대화) 하기 위해 반복해서 훈련하게 됩니다.

 

The model will learn which action (and then subsequent actions) will result in the highest cumulative reward on the way to the goal.

 

이 모델은 우리가 목표로 하는 것을 달성하기 위한 최대화된 누적보상의 결과를 가져 올 수 있게 하는 것이 어떤 행동 (그리고 후속 행동)인가를 배우게 됩니다. 

 

Learning doesn’t just happen on the first go; it takes some iteration. First, the agent needs to explore and see where it can get the highest rewards, before it can exploit that knowledge.

 

학습은 한번에 완성되지 않습니다. 반복이 필요합니다. 첫째, 에이전트는 knowledge를 취하기 전에 가장 높은 보상을 받을 수 있는 것이 어떤 것인지를 탐색해야 합니다. 

 

Exploration

As the agent gains more and more experience, it learns to stay on the central squares to get higher rewards.

If we plot the total reward from each episode, we can see how the model performs and improves over time.

 

agent 는 점점 더 많은 경험을 쌓게 됩니다. 그러는 와중에 더 많은 점수를 얻으려면 중앙 격자를 계속 따라가야 한다는 것을 배우게 될 것입니다. 

 

각 에피소드별 보상 점수가 어떤지를 보면 이 모델이 어떤 퍼포먼스를 보여주고 있고 얼마나 개선되고 있는지를 알 수 있습니다.

Exploitation and Convergence

With more experience, the agent gets better and eventually is able to reach the destination reliably.

 

경험이 많아질 수록 agent 는 점점 더 나아지고 결국에는 목표에 도달할 수 있게 됩니다.

 

Depending on the exploration-exploitation strategy, the vehicle may still have a small probability of taking random actions to explore the environment.

 

이 exploration-exploitation strategy(탐사-탐사 전략)에 근거해서 차량은 환경을 탐사하기 위한 랜덤한 액션 (무작위 행동)을 할 가능성이 점점 더 줄어들게 됩니다.

 

 

 

AWS DeepRacer에서 보상 기능 reward function은 현재 상태를 설명하고 숫자 보상 값을 반환하는 특정 매개 변수가있는 Python 함수입니다.

 

보상 기능으로 전달 된 매개 변수는 트랙의 위치와 방향, 관측 된 속도, 조향 각도 등과 같은 차량 상태의 다양한 측면을 나타냅니다.

 

우리는이 매개 변수 중 몇 가지를 탐색하고 트랙 주변을 따라 차량을 묘사하는 방법을 살펴 보겠습니다.

 

  • Position on track
  • Heading
  • Waypoints
  • Track width
  • Distance from center line
  • All wheels on track
  • Speed
  • Steering angle

1. Position on track

The parameters x and y describe the position of the vehicle in meters, measured from the lower-left corner of the environment.

 

매개 변수 x 및 y는 환경의 왼쪽 하단 모서리에서 측정 한 차량의 위치를 미터 단위로 나타냅니다.

 

 

2. Heading

The heading parameter describes the orientation of the vehicle in degrees, measured counter-clockwise from the X-axis of the coordinate system.

 

heading 매개 변수는 좌표계의 X 축에서 시계 반대 방향으로 측정 한 차량의 방향을 도 단위로 나타냅니다.

 

 

3. Waypoints

The waypoints parameter is an ordered list of milestones placed along the track center.

Each waypoint in waypoints is a pair [x, y] of coordinates in meters, measured in the same coordinate system as the car's position.

 

waypoints 매개 변수는 트랙 센터를 따라 배치 된 마일스톤의 정렬 된 목록입니다.
waypoints 안에있는 각 waypoints 는  자동차의 위치에 대해 좌표계에서 측정 된 미터 단위의 좌표 [x, y] 쌍입니다.

 

 

4. Track width

The track_width parameter is the width of the track in meters.

 

track_width parameter는 미터로 된 트랙의 너비 입니다.

 

 

5. Distance from center line

The distance_from_center parameter measures the displacement of the vehicle from the center of the track.

The is_left_of_center parameter is a boolean describing whether the vehicle is to the left of the center line of the track.

 

distance_from_center 매개 변수는 트랙의 중심에서 차량의 변위를 측정합니다.
is_left_of_center 매개 변수는 차량이 트랙의 중심선 왼쪽에 있는지 여부를 나타내는 boolean  값입니다.

 

 

6. All wheels on track

The all_wheels_on_track parameter is a boolean (true / false) which is true if all four wheels of the vehicle are inside the track borders, and false if any wheel is outside the track.

 

all_wheels_on_track 매개 변수는 boolean  (true / false)이며 차량의 네 바퀴가 모두 트랙 테두리 안에 있으면 true이고, 하나라도 바퀴가 밖에 있으면 false가 됩니다.

 

 

7. Speed

The speed parameter measures the observed speed of the vehicle, measured in meters per second.

 

speed parameter는 초속 몇미터인가를 나타내는 차량의 관측된 속도입니다.

 

 

8. Steering angle

The steering_angle parameter measures the steering angle of the vehicle, measured in degrees.

This value is negative if the vehicle is steering right, and positive if the vehicle is steering left.

 

steering_angle 매개 변수는 차량의 조향 각도를 도 단위로 측정합니다.
이 값은 차량이 오른쪽으로 조향하는 경우 음수이고 차량이 좌회전하는 경우 양수입니다.

 

 

read the detailed documentation

 

Train and Evaluate AWS DeepRacer Models Using the AWS DeepRacer Console - AWS DeepRacer

Train and Evaluate AWS DeepRacer Models Using the AWS DeepRacer Console To train a reinforcement learning model, you can use the AWS DeepRacer console. In the console, create a training job, choose a supported framework and an available algorithm, add a re

docs.aws.amazon.com

 

 

The Reward Function.

 

Putting it all together

With all these parameters at your disposal, you can define a reward function to incentivize whatever driving behavior you like.

Let's see a few examples of reward functions and how they use the parameters to determine a reward. The following three reward functions are available as examples in the AWS DeepRacer console so you can try them out and see how they behave, or submit them to the AWS DeepRacer League.

 

이러한 모든 매개 변수를 마음대로 활용하면 원하는 운전 행동에 대한 인센티브를 주는 보상 기능을 정의 할 수 있습니다.

보상 기능의 몇 가지 예와 보상을 결정하기 위해 매개 변수를 사용하는 방법을 살펴 보겠습니다. AWS DeepRacer 콘솔에서 다음과 같은 세 가지 보상 기능을 사용할 수 있으므로 이를 시험해보고 어떻게 동작하는지 보거나 AWS DeepRacer League에 제출할 수 있습니다.

 

 

이 예에서는 자동차가 궤도에 머무를 때 높은 보상을주고 차가 궤도 경계를 벗어나는 경우 페널티를줍니다.

이 예제에서는 all_wheels_on_track, distance_from_center 및 track_width 매개 변수를 사용하여 자동차가 트랙에 있는지 여부를 확인하고 높은 경우 보상을 제공합니다.

이 기능은 트랙에 머무르는 것 이외의 특정 종류의 행동에 대해 보상하지 않으므로이 기능으로 교육받은 agent 는 특정 행동으로 수렴하는 데 시간이 오래 걸릴 수 있습니다.

 

 

 

 

이 예제에서 우리는 트랙의 중심에서 차가 얼마나 떨어져 있는지 측정하고, 차가 중심선에 가까이 있으면 더 높은 보상을줍니다.

이 예제에서는 track_width 및 distance_from_center 매개 변수를 사용하고 트랙의 중심에서 차가 멀어 질수록 보상이 줄어 듭니다.

이 예는 보상의 대상이되는 운전 행동의 유형에 따라 다르므로이 기능을 사용하여 교육을받은 agent는 트랙을 잘 따라갈 수 있습니다. 그러나 모서리의 가속이나 제동과 같은 다른 행동을 배우기는 쉽지 않습니다.

 

 

 

대안의 전략 alternative strategy은 자동차가 운전하는 방식에 관계없이 각 단계에 대해 지속적인 보상을 제공하는 것입니다.

이 예제는 입력 매개 변수를 사용하지 않고 각 단계마다 상수 보상 1.0을 반환합니다.

에이전트의 유일한 인센티브는 트랙을 성공적으로 끝내는 것이고, 더 빠르게 운전하거나 특정 경로를 따라갈 인센티브가 없습니다. 그것은 불규칙하게 행동 할 수 있습니다.

그러나 보상 기능은 agent의 행동을 제한하지 않으므로 예상치 못한 전략과 행동을 탐색하여 오히려 실적이 좋을 수도 있습니다.

 

 

 

 

 

 

반응형


반응형

1. Imported Libraries

pandas : https://en.wikipedia.org/wiki/Pandas_(software)

 

pandas (software) - Wikipedia

Python programming library for data manipulation and analysis In computer programming, pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for

en.wikipedia.org

In computer programming, pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series. It is free software released under the three-clause BSD license.[2] The name is derived from the term "panel data", an econometrics term for data sets that include observations over multiple time periods for the same individuals

 

https://pandas.pydata.org/

 

Python Data Analysis Library — pandas: Python Data Analysis Library

Python Data Analysis Library pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. pandas is a NumFOCUS sponsored project. This will help ensure t

pandas.pydata.org

 

numpy : https://en.wikipedia.org/wiki/NumPy

 

NumPy - Wikipedia

From Wikipedia, the free encyclopedia Jump to navigation Jump to search Numerical programming library for the Python programming language NumPy (pronounced (NUM-py) or sometimes [2][3] (NUM-pee)) is a library for the Python programming language, adding sup

en.wikipedia.org

NumPy (pronounced /ˈnʌmp/ (NUM-py) or sometimes /ˈnʌmpi/[2][3] (NUM-pee)) is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. The ancestor of NumPy, Numeric, was originally created by Jim Hugunin with contributions from several other developers. In 2005, Travis Oliphant created NumPy by incorporating features of the competing Numarray into Numeric, with extensive modifications. NumPy is open-source software and has many contributors.

 

https://www.numpy.org/

 

NumPy — NumPy

NumPy NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object sophisticated (broadcasting) functions tools for integrating C/C++ and Fortran code useful linear algebra, Fo

www.numpy.org

NumPy is the fundamental package for scientific computing with Python. It contains among other things:

  • a powerful N-dimensional array object
  • sophisticated (broadcasting) functions
  • tools for integrating C/C++ and Fortran code
  • useful linear algebra, Fourier transform, and random number capabilities

Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases.

NumPy is licensed under the BSD license, enabling reuse with few restrictions.

 

boto3 : Interacting for S3   https://boto3.amazonaws.com/v1/documentation/api/latest/index.html

 

Boto 3 Documentation — Boto 3 Docs 1.9.148 documentation

 

boto3.amazonaws.com

Boto is the Amazon Web Services (AWS) SDK for Python. It enables Python developers to create, configure, and manage AWS services, such as EC2 and S3. Boto provides an easy to use, object-oriented API, as well as low-level access to AWS services.

 

sagemaker.amazon.common

 

2. https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.seed.html

 

numpy.random.seed — NumPy v1.16 Manual

Parameters: seed : int or 1-d array_like, optional Seed for RandomState. Must be convertible to 32 bit unsigned integers.

docs.scipy.org

numpy.random.seed(seed=None)

Seed the generator.

This method is called when RandomState is initialized. It can be called again to re-seed the generator. For details, see RandomState.

Parameters:

seed : int or 1-d array_like, optional

Seed for RandomState. Must be convertible to 32 bit unsigned integers.

See also

RandomState

 

3. numpy.random.random_sample(size=None) : https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.random_sample.html?highlight=random%20random_sample#numpy.random.random_sample

 

numpy.random.random_sample — NumPy v1.16 Manual

Parameters: size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned.

docs.scipy.org

numpy.random.randint : https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randint.html

 

numpy.random.randint — NumPy v1.16 Manual

Parameters: low : int Lowest (signed) integer to be drawn from the distribution (unless high=None, in which case this parameter is one above the highest such integer). high : int, optional If provided, one above the largest (signed) integer to be drawn fro

docs.scipy.org

4. 

5. df : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html

 

pandas.DataFrame — pandas 0.24.2 documentation

Parameters: data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame Dict can contain Series, arrays, constants, or list-like objects Changed in version 0.23.0: If data is a dict, argument order is maintained for Python 3.6 and later. index

pandas.pydata.org

 

 

 

6. df - Print values

7. 파일로 저장 pandas.DataFrame.to_csv : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html

 

pandas.DataFrame.to_csv — pandas 0.24.2 documentation

Parameters: path_or_buf : str or file handle, default None File path or object, if None is provided the result is returned as a string. If a file object is passed it should be opened with newline=’‘, disabling universal newlines. Changed in version 0.24.0:

pandas.pydata.org

8. 함수 : 3개의 파라미터를 받음 - 파일을 S3에 저장하는 함수

9. 함수 : boto3를 사용해서 해당 파일을 S3 버킷으로부터 다운 받음

boto3.Session().resource('s3') : https://boto3.amazonaws.com/v1/documentation/api/latest/guide/session.html

 

Session — Boto 3 Docs 1.9.148 documentation

Session A session manages state about a particular configuration. By default a session is created for you when needed. However it is possible and recommended to maintain your own session(s) in some scenarios. Sessions typically store: Credentials Region Ot

boto3.amazonaws.com

10. 8번 함수를 실행시켜 해당 파일을 S3에 저장

upload_fileobj : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html?highlight=upload_fileobj#S3.Bucket.upload_fileobj

 

S3 — Boto 3 Docs 1.9.148 documentation

The response of this operation contains an EventStream member. When iterated the EventStream will yield events based on the structure below, where only one of the top level keys will be present for any given event. Response Syntax { 'Payload': EventStream(

boto3.amazonaws.com

11. 9번 함수를 실행시켜 해당 파일을 S3로부터 다운 받음

Bucket object download_fileobj : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html?highlight=download_fileobj#S3.Bucket.download_fileobj

 

S3 — Boto 3 Docs 1.9.148 documentation

The response of this operation contains an EventStream member. When iterated the EventStream will yield events based on the structure below, where only one of the top level keys will be present for any given event. Response Syntax { 'Payload': EventStream(

boto3.amazonaws.com

12. 

13. 처음 시작 5개 데이터를 출력함

df.head() : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.head.html

 

pandas.DataFrame.head — pandas 0.24.2 documentation

Return the first n rows. This function returns the first n rows for the object based on position. It is useful for quickly testing if your object has the right type of data in it. Parameters: n : int, default 5 Number of rows to select. Returns: obj_head :

pandas.pydata.org

14. 해당 컬럼들을 매트릭스에 담음 ??? 

pandas.DataFrame.as_matrix : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.as_matrix.html?highlight=as_matrix#pandas.DataFrame.as_matrix

 

pandas.DataFrame.as_matrix — pandas 0.24.2 documentation

Parameters: columns : list, optional, default:None If None, return all columns, otherwise, returns specified columns.

pandas.pydata.org

15. X 값들

16. ???

17. y 컬럼을 매트릭스에 담음

 

18. y 값 형태. 10줄에 1개 컬럼

19. y 값

20. y 값을 한줄에 표시함

numpy.ravel : https://docs.scipy.org/doc/numpy/reference/generated/numpy.ravel.html

 

numpy.ravel — NumPy v1.16 Manual

Parameters: a : array_like Input array. The elements in a are read in the order specified by order, and packed as a 1-D array. order : {‘C’,’F’, ‘A’, ‘K’}, optional The elements of a are read using this index order. ‘C’ means to index the elements in row-m

docs.scipy.org

21. y 값

23. 함수 : 전달받은 파일을 ????

write_numpy_to_dense_tensor : https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/amazon/common.py

 

aws/sagemaker-python-sdk

A library for training and deploying machine learning models on Amazon SageMaker - aws/sagemaker-python-sdk

github.com

read_records

24. 함수 : 해당 파일을 ?????

25. write_recordio_file 함수를 실행 함

 

 

26. 첫 3 줄만 출력

27. read_recordio_file 함수 실행

32. 해당 파일을 S3에 저장함

33. 해당 파일을 S3에서 다운 받음

 

반응형

AWS Machine Learning - Types of ML models etc.

2019. 5. 9. 10:04 | Posted by 솔웅


반응형

AWS Machine Learning

 

* Supervised Learning : Training Set and Test Set

 

 

 

Types of ML Models

Amazon ML supports three types of ML models: binary classification, multiclass classification, and regression. The type of model you should choose depends on the type of target that you want to predict.

Binary Classification Model

ML models for binary classification problems predict a binary outcome (one of two possible classes). To train binary classification models, Amazon ML uses the industry-standard learning algorithm known as logistic regression.

Examples of Binary Classification Problems

  • "Is this email spam or not spam?"

  • "Will the customer buy this product?"

  • "Is this product a book or a farm animal?"

  • "Is this review written by a customer or a robot?"

Multiclass Classification Model

ML models for multiclass classification problems allow you to generate predictions for multiple classes (predict one of more than two outcomes). For training multiclass models, Amazon ML uses the industry-standard learning algorithm known as multinomial logistic regression.

Examples of Multiclass Problems

  • "Is this product a book, movie, or clothing?"

  • "Is this movie a romantic comedy, documentary, or thriller?"

  • "Which category of products is most interesting to this customer?"

Regression Model

ML models for regression problems predict a numeric value. For training regression models, Amazon ML uses the industry-standard learning algorithm known as linear regression.

Examples of Regression Problems

  • "What will the temperature be in Seattle tomorrow?"

  • "For this product, how many units will sell?"

  • "What price will this house sell for?"

ML 모델 유형

Amazon ML은 이진수 분류, 멀티클래스 분류 및 회귀라는 세 가지 유형의 ML 모델을 지원합니다. 선택해야 하는 모델 유형은 예측하려는 목표의 유형에 따라 따릅니다.

이진 분류 모델

이진 분류 문제에 대한 ML 모델은 이진 결과(가능성이 있는 두 가지 클래스 중 하나)를 예측합니다. 이진수 분류 모델을 교육하기 위해 은 '로지스틱 회귀'로 알려진 업계 표준 학습 알고리즘을 사용합니다.

이진 분류 문제의 예

  • "이 이메일은 스팸입니까? 스팸이 아닙니까?"

  • "고객이 이 제품을 구입할 것입니까?"

  • "이 제품은 책입니까? 아니면 가축입니까?"

  • "이 리뷰는 고객이 작성합니까? 로봇이 작성합니까?"

멀티클래스 분류 모델

멀티클래스 분류 문제에 대해 ML 모델을 사용하면 여러 클래스에 대한 예측을 생성할 수 있습니다(세 개 이상의 결과 중 하나를 예측). 멀티클래스 모델을 교육하기 위해 은 '다항 로지스틱 회귀'로 알려진 업계 표준 학습 알고리즘을 사용합니다.

멀티클래스 문제의 예

  • "이 제품은 책, 영화 또는 의류입니까?"

  • "이 영화는 로맨틱 코미디, 다큐멘터리 또는 스릴러입니까?"

  • "이 고객이 가장 관심을 갖는 제품 카테고리는 무엇입니까?"

회귀 모델

회귀 문제에 대해 ML 모델은 숫자 값을 예측합니다. 회귀 모델을 교육하기 위해 은 '선형 회귀'로 알려진 업계 표준 학습 알고리즘을 사용합니다.

회귀 문제의 예

  • "내일 시애틀의 기온은 어떨까요?"

  • "이 제품의 판매량이 얼마나 될까요?"

  • "이 집의 매매 가격이 얼마나 될까요?"

 

 

- Unsupervised Learning : Only data,
  Clustering Algorithm :
  Dimensionality Reduction
  Group words that are used in similar context or have similar meaning
  

 


Reinforcement Learning 
  Decision Making under uncertainty
  Autonomous Driving
  Games
  Reinforcement uses Reward Functions to reward correct decision and punish incorrect decision

 

Reinforcement Learning with Amazon SageMaker RL

Reinforcement learning (RL) is a machine learning technique that attempts to learn a strategy, called a policy, that optimizes an objective for an agent acting in an environment. For example, the agent might be a robot, the environment might be a maze, and the goal might be to successfully navigate the maze in the smallest amount of time. In RL, the agent takes an action, observes the state of the environment, and gets a reward based on the value of the current state of the environment. The goal is to maximize the long-term reward that the agent receives as a result of its actions. RL is well-suited for solving problems where an agent can make autonomous decisions.

Topics

Why is Reinforcement Learning Important?

RL is well-suited for solving large, complex problems. For example, supply chain management, HVAC systems, industrial robotics, game artificial intelligence, dialog systems, and autonomous vehicles. Because RL models learn by a continuous process of receiving rewards and punishments for every action taken by the agent, it is possible to train systems to make decisions under uncertainty and in dynamic environments.

Markov Decision Process (MDP)

RL is based on models called Markov Decision Processes (MDPs). An MDP consists of a series of time steps. Each time step consists of the following:

Environment

Defines the space in which the RL model operates. This can be either a real-world environment or a simulator. For example, if you train a physical autonomous vehicle on a physical road, that would be a real-world environment. If you train a computer program that models an autonomous vehicle driving on a road, that would be a simulator.

State

Specifies all information about the environment and past steps that is relevant to the future. For example, in an RL model in which a robot can move in any direction at any time step, then the position of the robot at the current time step is the state, because if we know where the robot is, it isn't necessary to know the steps it took to get there.

Action

What the agent does. For example, the robot takes a step forward.

Reward

A number that represents the value of the state that resulted from the last action that the agent took. For example, if the goal is for a robot to find treasure, the reward for finding treasure might be 5, and the reward for not finding treasure might be 0. The RL model attempts to find a strategy that optimizes the cumulative reward over the long term. This strategy is called a policy.

Observation

Information about the state of the environment that is available to the agent at each step. This might be the entire state, or it might be just a part of the state. For example, the agent in a chess-playing model would be able to observe the entire state of the board at any step, but a robot in a maze might only be able to observe a small portion of the maze that it currently occupies.

Typically, training in RL consists of many episodes. An episode consists of all of the time steps in an MDP from the initial state until the environment reaches the terminal state.

Key Features of Amazon SageMaker RL

To train RL models in Amazon SageMaker RL, use the following components:

  • A deep learning (DL) framework. Currently, Amazon SageMaker supports RL in TensorFlow and Apache MXNet.

  • An RL toolkit. An RL toolkit manages the interaction between the agent and the environment, and provides a wide selection of state of the art RL algorithms. Amazon SageMaker supports the Intel Coach and Ray RLlib toolkits. For information about Intel Coach, see https://nervanasystems.github.io/coach/. For information about Ray RLlib, see https://ray.readthedocs.io/en/latest/rllib.html.

  • An RL environment. You can use custom environments, open-source environments, or commercial environments. For information, see RL Environments in Amazon SageMaker.

The following diagram shows the RL components that are supported in Amazon SageMaker RL.

 

Amazon SageMaker RL을 사용한 강화 학습

강화 학습(RL)은 환경에서 작동하는 에이전트에 대한 목표를 최적화하는 전략(정책이라고 함)을 배우려고 시도하는 기계 학습 기법입니다. 예를 들어, 에이전트는 로봇, 환경은 미로, 목표는 최단시간 내에 미로를 성공적으로 탈출하는 것일 수 있습니다. RL에서 에이전트는 행동을 취하고, 환경의 상태를 관찰하고, 환경의 현재 상태 값에 따라 보상을 받습니다. 목표는 행동의 결과로 에이전트가 받는 장기 보상을 극대화하는 것입니다. RL은 에이전트가 자율 의사결정을 내릴 수 있는 문제를 해결하는 데 매우 적합합니다.

주제

강화 학습이 중요한 이유는 무엇입니까?

RL은 크고 복잡한 문제를 해결하는 데 매우 적합합니다. 예를 들어, 공급망 관리, HVAC 시스템, 산업용 로봇, 게임 인공 지능, 음성 대화 시스템 및 자율 주행 차량 등이 있습니다. RL 모델은 에이전트가 취하는 모든 행동에 대해 보상과 처벌을 받는 연속 프로세스를 통해 학습하기 때문에 동적인 환경에서 불확실성이 존재할 때 시스템이 의사를 결정하도록 훈련할 수 있습니다.

마코프 의사결정 과정(MDP)

RL은 마코프 의사결정 과정(MDP)라는 모델을 기반으로 합니다. MDP는 일련의 시간 단계로 구성됩니다. 각 시간 단계는 다음과 같은 요소로 구성됩니다.

환경

RL 모델이 작동하는 공간을 정의합니다. 이러한 공간은 실제 환경 또는 시뮬레이터일 수 있습니다. 예를 들어, 실제 도로에서 자율 주행 차량을 훈련하는 경우는 환경이 실제 환경입니다. 도로 위를 주행하는 자율 주행 차량을 모델링하는 컴퓨터 프로그램을 훈련하는 경우에는 환경이 시뮬레이터입니다.

상태

환경에 대한 모든 정보와 미래와 관련된 과거의 모든 단계를 지정합니다. 예를 들어, 로봇이 언제든지 어떤 방향으로든 이동할 수 있는 RL 모델에서는 현재 시간 단계에서 로봇의 위치가 상태입니다. 로봇 위치를 알면 해당 위치에 도착하기 위해 어떤 단계를 수행했는지 알 필요가 없기 때문입니다.

작업

작업은 에이전트가 수행합니다. 예를 들어 로봇이 앞으로 나아갑니다.

보상

에이전트가 수행한 마지막 작업의 상태 값을 나타내는 숫자입니다. 예를 들어, 목표가 로봇이 보물을 찾도록 하는 것이라면 보물을 찾은 경우 보상이 5이고, 보물을 찾지 못한 경우에는 보상이 0일 수 있습니다. RL 모델은 장기간 누적된 보상을 최적화하는 전략을 찾으려고 합니다. 이러한 전략을 정책이라고 합니다.

관측치

각 단계마다 에이전트가 사용할 수 있는 환경 상태에 대한 정보입니다. 전체 상태이거나 상태의 일부분일 수 있습니다. 예를 들어, 체스 시합 모델의 에이전트는 모든 단계에서 체스판의 전체 상태를 관찰할 수 있지만 미로 속의 로봇은 현재 마주하고 있는 미로의 작은 부분 밖에 관찰할 수 없습니다.

일반적으로 RL의 훈련은 많은 에피소드로 구성됩니다. 에피소드는 초기 상태에서 환경이 최종 상태에 도달할 때까지 MDP의 모든 시간 단계로 구성됩니다.

Amazon SageMaker RL의 주요 기능

Amazon SageMaker RL에서 RL 모델을 훈련하려면 다음 구성 요소를 사용합니다.

  • 딥 러닝(DL) 프레임워크. 현재, Amazon SageMaker는 TensorFlow 및 Apache MXNet에서 RL을 지원합니다.

  • RL 도구 키트. RL 도구 키트는 에이전트와 환경 간의 상호 작용을 관리하고, RL 알고리즘의 광범위한 상태 선택 항목을 제공합니다. Amazon SageMaker는 Intel Coach 및 Ray RLlib 도구 키트를 제공합니다. Intel Coach에 대한 자세한 정보는 https://nervanasystems.github.io/coach/를 참조하십시오. Ray RLlib에 대한 자세한 정보는 https://ray.readthedocs.io/en/latest/rllib.html을 참조하십시오.

  • RL 환경. 사용자 지정 환경, 오픈 소스 환경 또는 상용 환경을 사용할 수 있습니다. 자세한 정보는 Amazon SageMaker의 RL 환경 단원을 참조하십시오.

다음 다이어그램은 Amazon SageMaker RL에서 지원되는 RL 구성 요소를 보여 줍니다.

 

- refer to the picture above -

 

 

 

* Data types  
* Data in Real Life : Numeric, Text, Categorical values
* Categorical : Cartesian Transformation - Combine categorical features to form new features
* Text Type : NGRAM, OSB Transformation, Stemming, Lower Case
* Numeric Data :

 

Data Transformations Reference

Topics

N-gram Transformation

The n-gram transformation takes a text variable as input and produces strings corresponding to sliding a window of (user-configurable) n words, generating outputs in the process. For example, consider the text string "I really enjoyed reading this book".

Specifying the n-gram transformation with window size=1 simply gives you all the individual words in that string:

 

{"I", "really", "enjoyed", "reading", "this", "book"}

Specifying the n-gram transformation with window size =2 gives you all the two-word combinations as well as the one-word combinations:

 

{"I really", "really enjoyed", "enjoyed reading", "reading this", "this book", "I", "really", "enjoyed", "reading", "this", "book"}

Specifying the n-gram transformation with window size = 3 will add the three-word combinations to this list, yielding the following:

 

{"I really enjoyed", "really enjoyed reading", "enjoyed reading this", "reading this book", "I really", "really enjoyed", "enjoyed reading", "reading this", "this book", "I", "really", "enjoyed", "reading", "this", "book"}

You can request n-grams with a size ranging from 2-10 words. N-grams with size 1 are generated implicitly for all inputs whose type is marked as text in the data schema, so you do not have to ask for them. Finally, keep in mind that n-grams are generated by breaking the input data on whitespace characters. That means that, for example, punctuation characters will be considered a part of the word tokens: generating n-grams with a window of 2 for string "red, green, blue" will yield {"red,", "green,", "blue,", "red, green", "green, blue"}. You can use the punctuation remover processor (described later in this document) to remove the punctuation symbols if this is not what you want.

To compute n-grams of window size 3 for variable var1:

 

"ngram(var1, 3)"

Orthogonal Sparse Bigram (OSB) Transformation

The OSB transformation is intended to aid in text string analysis and is an alternative to the bi-gram transformation (n-gram with window size 2). OSBs are generated by sliding the window of size n over the text, and outputting every pair of words that includes the first word in the window.

To build each OSB, its constituent words are joined by the "_" (underscore) character, and every skipped token is indicated by adding another underscore into the OSB. Thus, the OSB encodes not just the tokens seen within a window, but also an indication of number of tokens skipped within that same window.

To illustrate, consider the string "The quick brown fox jumps over the lazy dog", and OSBs of size 4. The six four-word windows, and the last two shorter windows from the end of the string are shown in the following example, as well OSBs generated from each:

Window, {OSBs generated}

 

"The quick brown fox", {The_quick, The__brown, The___fox} "quick brown fox jumps", {quick_brown, quick__fox, quick___jumps} "brown fox jumps over", {brown_fox, brown__jumps, brown___over} "fox jumps over the", {fox_jumps, fox__over, fox___the} "jumps over the lazy", {jumps_over, jumps__the, jumps___lazy} "over the lazy dog", {over_the, over__lazy, over___dog} "the lazy dog", {the_lazy, the__dog} "lazy dog", {lazy_dog}

Orthogonal sparse bigrams are an alternative for n-grams that might work better in some situations. If your data has large text fields (10 or more words), experiment to see which works better. Note that what constitutes a large text field may vary depending on the situation. However, with larger text fields, OSBs have been empirically shown to uniquely represent the text due to the special skip symbol (the underscore).

You can request a window size of 2 to 10 for OSB transformations on input text variables.

To compute OSBs with window size 5 for variable var1:

"osb(var1, 5)"

Lowercase Transformation

The lowercase transformation processor converts text inputs to lowercase. For example, given the input "The Quick Brown Fox Jumps Over the Lazy Dog", the processor will output "the quick brown fox jumps over the lazy dog".

To apply lowercase transformation to the variable var1:

"lowercase(var1)"

Remove Punctuation Transformation

Amazon ML implicitly splits inputs marked as text in the data schema on whitespace. Punctuation in the string ends up either adjoining word tokens, or as separate tokens entirely, depending on the whitespace surrounding it. If this is undesirable, the punctuation remover transformation may be used to remove punctuation symbols from generated features. For example, given the string "Welcome to AML - please fasten your seat-belts!", the following set of tokens is implicitly generated:

 

{"Welcome", "to", "Amazon", "ML", "-", "please", "fasten", "your", "seat-belts!"}

Applying the punctuation remover processor to this string results in this set:

 

{"Welcome", "to", "Amazon", "ML", "please", "fasten", "your", "seat-belts"}

Note that only the prefix and suffix punctuation marks are removed. Punctuations that appear in the middle of a token, e.g. the hyphen in "seat-belts", are not removed.

To apply punctuation removal to the variable var1:

"no_punct(var1)"

Quantile Binning Transformation

The quantile binning processor takes two inputs, a numerical variable and a parameter called bin number, and outputs a categorical variable. The purpose is to discover non-linearity in the variable's distribution by grouping observed values together.

In many cases, the relationship between a numeric variable and the target is not linear (the numeric variable value does not increase or decrease monotonically with the target). In such cases, it might be useful to bin the numeric feature into a categorical feature representing different ranges of the numeric feature. Each categorical feature value (bin) can then be modeled as having its own linear relationship with the target. For example, let's say you know that the continuous numeric feature account_age is not linearly correlated with likelihood to purchase a book. You can bin age into categorical features that might be able to capture the relationship with the target more accurately.

The quantile binning processor can be used to instruct Amazon ML to establish n bins of equal size based on the distribution of all input values of the age variable, and then to substitute each number with a text token containing the bin. The optimum number of bins for a numeric variable is dependent on characteristics of the variable and its relationship to the target, and this is best determined through experimentation. Amazon ML suggests the optimal bin number for a numeric feature based on data statistics in the Suggested Recipe.

You can request between 5 and 1000 quantile bins to be computed for any numeric input variable.

To following example shows how to compute and use 50 bins in place of numeric variable var1:

"quantile_bin(var1, 50)"

Normalization Transformation

The normalization transformer normalizes numeric variables to have a mean of zero and variance of one. Normalization of numeric variables can help the learning process if there are very large range differences between numeric variables because variables with the highest magnitude could dominate the ML model, no matter if the feature is informative with respect to the target or not.

To apply this transformation to numeric variable var1, add this to the recipe:

normalize(var1)

This transformer can also take a user defined group of numeric variables or the pre-defined group for all numeric variables (ALL_NUMERIC) as input:

normalize(ALL_NUMERIC)

Note

It is not mandatory to use the normalization processor for numeric variables.

Cartesian Product Transformation

The Cartesian transformation generates permutations of two or more text or categorical input variables. This transformation is used when an interaction between variables is suspected. For example, consider the bank marketing dataset that is used in Tutorial: Using Amazon ML to Predict Responses to a Marketing Offer. Using this dataset, we would like to predict whether a person would respond positively to a bank promotion, based on the economic and demographic information. We might suspect that the person's job type is somewhat important (perhaps there is a correlation between being employed in certain fields and having the money available), and the highest level of education attained is also important. We might also have a deeper intuition that there is a strong signal in the interaction of these two variables—for example, that the promotion is particularly well-suited to customers who are entrepreneurs who earned a university degree.

The Cartesian product transformation takes categorical variables or text as input, and produces new features that capture the interaction between these input variables. Specifically, for each training example, it will create a combination of features, and add them as a standalone feature. For example, let's say our simplified input rows look like this:

target, education, job

0, university.degree, technician

0, high.school, services

1, university.degree, admin

If we specify that the Cartesian transformation is to be applied to the categorical variables education and job fields, the resultant feature education_job_interaction will look like this:

target, education_job_interaction

0, university.degree_technician

0, high.school_services

1, university.degree_admin

The Cartesian transformation is even more powerful when it comes to working on sequences of tokens, as is the case when one of its arguments is a text variable that is implicitly or explicitly split into tokens. For example, consider the task of classifying a book as being a textbook or not. Intuitively, we might think that there is something about the book's title that can tell us it is a textbook (certain words might occur more frequently in textbooks' titles), and we might also think that there is something about the book's binding that is predictive (textbooks are more likely to be hardcover), but it's really the combination of some words in the title and binding that is most predictive. For a real-world example, the following table shows the results of applying the Cartesian processor to the input variables binding and title:

TextbookTitleBindingCartesian product of no_punct(Title) and Binding

1 Economics: Principles, Problems, Policies Hardcover {"Economics_Hardcover", "Principles_Hardcover", "Problems_Hardcover", "Policies_Hardcover"}
0 The Invisible Heart: An Economics Romance Softcover {"The_Softcover", "Invisible_Softcover", "Heart_Softcover", "An_Softcover", "Economics_Softcover", "Romance_Softcover"}
0 Fun With Problems Softcover {"Fun_Softcover", "With_Softcover", "Problems_Softcover"}

The following example shows how to apply the Cartesian transformer to var1 and var2:

cartesian(var1, var2)

 

데이터 변환 참조

주제

n-gram 변환

n-gram 변환은 텍스트 변수를 입력으로 가져오고 (사용자가 구성 가능한) n 단어 창을 슬라이딩하는 문자열을 생성하여 해당 프로세스에서 출력을 생성합니다. 예를 들어 "I really enjoyed reading this book"이라는 텍스트 문자열을 생각해 보겠습니다.

창 크기 = 1인 n-gram 변환을 지정하면 다음과 같이 해당 문자열에 있는 모든 개별 단어가 제공됩니다.

 

{"I", "really", "enjoyed", "reading", "this", "book"}

창 크기 = 2인 n-gram 변환을 지정하면 다음과 같이 모든 2단어 조합과 모든 1단어 조합이 제공됩니다.

 

{"I really", "really enjoyed", "enjoyed reading", "reading this", "this book", "I", "really", "enjoyed", "reading", "this", "book"}

창 크기 = 3인 n-gram 변환을 지정하면 이 목록에 3단어 조합을 추가하여 다음을 산출합니다.

 

{"I really enjoyed", "really enjoyed reading", "enjoyed reading this", "reading this book", "I really", "really enjoyed", "enjoyed reading", "reading this", "this book", "I", "really", "enjoyed", "reading", "this", "book"}

n-gram을 2~10개 단어 범위의 크기로 요청할 수 있습니다. 크기가 1인 n-gram은 데이터 스키마에서 텍스트로 표시된 유형의 모든 입력에 대해 암시적으로 생성되므로, 사용자가 요청할 필요가 없습니다. 마지막으로, n-gram은 공백 문자에 대한 입력 데이터를 분해하여 생성된다는 것을 기억해야 합니다. 예를 들어 구두점 문자는 다음과 같이 단어 토큰의 일부로 간주됩니다. 문자열 "red, green, blue"에 대해 2개의 창으로 n-gram을 생성하면 {"red,", "green,", "blue,", "red, green", "green, blue"}로 산출됩니다. 구두점 제거 프로세서(이 문서의 뒷부분에서 설명)를 사용하여 원하지 않는 구두점을 제거할 수 있습니다.

변수 var1에 대해 창 크기가 3인 n-gram을 계산하려면:

 

"ngram(var1, 3)"

Orthogonal Sparse Bigram(OSB) 변환

OSB 변환은 텍스트 문자열 분석을 보조하는 목적이며 bi-gram 변환(창 크기가 2인 n-gram)을 대체하는 변환입니다. OSB는 n 단어 크기의 창을 텍스트 위로 슬라이딩하고 창의 첫 번째 단어가 포함된 모든 단어 페어를 출력하여 생성됩니다.

각 OSB를 구축하기 위해 구성 단어는 "_"(밑줄) 문자로 결합되며, 건너뛴 모든 토큰은 OSB에 또 다른 밑줄을 추가하여 표시됩니다. 따라서 OSB는 창 내에 확인되는 토큰뿐만 아니라 동일한 창 내에서 건너뛴 토큰의 수도 표시합니다.

예를 들어 "The quick brown fox jumps over the lazy dog"라는 문자열과 크기가 4인 OSB를 생각해 보겠습니다. 여섯 개의 4 단어 창 및 문자열 끝에 있는 더 짧은 길이의 마지막 창은 다음 예제에서 각 창에서 생성된 OSB와 함께 표시됩니다.

창, {생성된 OSB}

 

"The quick brown fox", {The_quick, The__brown, The___fox} "quick brown fox jumps", {quick_brown, quick__fox, quick___jumps} "brown fox jumps over", {brown_fox, brown__jumps, brown___over} "fox jumps over the", {fox_jumps, fox__over, fox___the} "jumps over the lazy", {jumps_over, jumps__the, jumps___lazy} "over the lazy dog", {over_the, over__lazy, over___dog} "the lazy dog", {the_lazy, the__dog} "lazy dog", {lazy_dog}

Orthogonal Sparse Bigram은 일부 상황에서 효과적으로 작용할 수 있는 n-gram의 대체 변환입니다. 데이터에 큰 텍스트 필드(10개 이상의 단어)가 있는 경우 실험을 통해 효과적인 방식을 살펴봅니다. 큰 텍스트 필드를 구성하는 내용은 상황에 따라 다를 수 있음을 참고하십시오. 그러나 큰 텍스트 필드를 사용하는 OSB는 특수 건너뛰기 기호(밑줄)로 인해 텍스트를 고유하게 나타내는 것으로 실증되었습니다.

입력 텍스트 변수의 OSB 변환에 대해 2~10의 창 크기를 요청할 수 있습니다.

변수 var1에 대해 창 크기가 5인 OSB를 계산하려면:

"osb(var1, 5)"

소문자 변환

소문자 변환 프로세서는 텍스트 입력을 소문자로 변환합니다. 예를 들어 프로세서는 "The Quick Brown Fox Jumps Over the Lazy Dog"라는 입력을 "the quick brown fox jumps over the lazy dog"라고 출력합니다.

변수 var1에 소문자 변환을 적용하려면:

"lowercase(var1)"

구두점 변환 제거

Amazon ML은 공백이 있는 데이터 스키마의 텍스트로 표시된 입력을 암시적으로 분리합니다. 문자열의 구두점은 주변의 공백에 따라 인접한 단어 토큰으로 끝나거나 완전히 별개의 토큰으로 끝납니다. 이것이 바람직하지 않은 경우, 생성된 특성의 구두점을 제거하는 데 구두점 제거 변환을 사용할 수 있습니다. 예를 들어 "Welcome to AML - please fasten your seat-belts!"라는 문자열이 있으면 다음과 같은 토큰 집합이 암시적으로 생성됩니다.

 

{"Welcome", "to", "Amazon", "ML", "-", "please", "fasten", "your", "seat-belts!"}

구두점 제거 프로세서를 이 문자열에 적용하면 다음과 같은 집합이 됩니다.

 

{"Welcome", "to", "Amazon", "ML", "please", "fasten", "your", "seat-belts"}

접두사 및 접미사 구두점만 제거됩니다. 토큰 중간에 나타나는 구두점("seat-belts"에 있는 하이픈 등)은 제거되지 않습니다.

변수 var1에 구두점 변환을 적용하려면:

"no_punct(var1)"

Quartile binning 변환

Quantile binning 프로세서는 숫자 변수 및 bin number라는 파라미터의 두 가지 입력을 사용해서 카테고리 변수를 출력합니다. 그 목적은 관측된 값을 그룹화하여 변수의 배포에서 비선형성을 발견하는 것입니다.

많은 경우에 숫자 변수와 대상 간의 관계는 선형적이지 않습니다(숫자 변수 값은 대상에 따라 점차 증가하거나 감소하지 않음). 이 경우 다양한 범위의 숫자 특성을 나타내는 카테고리 특성으로 숫자 특성을 비닝하는 것이 유용할 수 있습니다. 각 카테고리 특성 값(빈)은 대상과의 선형 관계를 갖도록 모델링될 수 있습니다. 예를 들어 연속적인 숫자 특성 account_age가 책을 구입할 가능성과 선형적으로 관련이 없다는 것을 알고 있다고 가정해 보겠습니다. 사용자는 대상과의 관계를 더욱 정확하게 캡처할 수 있는 카테고리 특성으로 age를 비닝할 수 있습니다.

quantile binning 프로세서는 Amazon ML이 age 변수의 모든 입력 값 배포를 기반으로 동일한 크기의 빈 n개를 설정한 다음 각 번호를 빈을 포함하는 텍스트 토큰으로 대체하도록 하는 데 사용될 수 있습니다. 숫자 변수에 대한 최적의 빈 수는 변수의 특징과 대상과의 관계에 따라 달라지며, 이는 실험을 통해 가장 효과적으로 결정됩니다. Amazon ML은 제안된 레시피의 데이터 통계를 기반으로 숫자 특성에 대한 최적의 빈 수를 제시합니다.

숫자 입력 변수에 대해 5~1000개의 quantile 빈을 계산하도록 요청할 수 있습니다.

다음 예제에서는 숫자 변수 var1 대신 50개의 빈을 계산하여 사용하는 방법을 보여 줍니다.

"quantile_bin(var1, 50)"

정규화 변환

정규화 변환기는 평균 값이 0이고 분산 값이 1인 숫자 변수를 정규화합니다. 특성이 대상과 관련하여 많은 정보가 되는지 여부와 관계없이 가장 큰 크기의 변수가 ML 모델의 대부분을 차지할 수 있기 때문에, 숫자 변수의 정규화는 숫자 변수 사이에 범위 차이가 매우 큰 경우에 학습 프로세스에 도움이 될 수 있습니다.

숫자 변수 var1에 이 변환을 적용하려면 다음과 같이 레시피에 추가합니다.

normalize(var1)

이 변환기는 숫자 변수의 사용자 정의 그룹 또는 모든 숫자 변수(ALL_NUMERIC)의 사전 정의된 그룹을 입력으로 사용할 수 있습니다.

normalize(ALL_NUMERIC)

참고

숫자 변수에 정규화 프로세서를 사용하는 것은 필수가 아닙니다.

데카르트 곱 변환

데카르트 변환은 두 개 이상의 텍스트 또는 카테고리 입력 변수의 순열을 생성합니다. 이 변환은 변수 간에 상호 작용이 있다고 생각될 때 사용합니다. 예를 들어 자습서: Amazon ML을 사용한 마케팅 반응 예측에서 사용되는 은행 마케팅 데이터 집합을 고려해 보겠습니다. 이 데이터 집합을 사용하여 경제 및 인구 통계 정보를 기반으로 은행 홍보에 긍정적인 반응을 보이는지 예측하려고 합니다. 해당하는 사람의 직업 유형이 상당히 중요하다고 생각할 수 있으며(특정 분야에서 근무하는 것과 사용 가능한 비용 간에 상관 관계가 있을 수 있음), 가장 높은 수준의 교육을 받은 사실도 중요하다고 간주할 수 있습니다. 또한 이 두 변수의 상호 작용에 강력한 신호가 있다는 것도 알 수 있습니다. 예를 들어 특히 학사 학위를 취득한 사업가 고객에게 홍보하는 것이 적합합니다.

데카르트 곱 변환은 카테고리 변수 또는 텍스트를 입력으로 사용하고, 이러한 입력 변수 간의 상호 작용을 캡처하는 새로운 특성을 생성합니다. 특히, 각 교육 예제에 대해 특성의 조합을 생성하고 이를 독립적인 특성으로 추가합니다. 예를 들어 다음과 같은 간소화된 입력 행이 있다고 가정하겠습니다.

target, education, job

0, university.degree, technician

0, high.school, services

1, university.degree, admin

데카르트 변환이 카테고리 변수 education 및 job 필드에 적용되도록 지정하면 결과적으로 다음과 같은 education_job_interaction 특성을 볼 수 있습니다.

target, education_job_interaction

0, university.degree_technician

0, high.school_services

1, university.degree_admin

데카르트 변환은 인수 중 하나가 암시적으로 또는 명시적으로 토큰으로 분리되는 텍스트 변수 같은 토큰 시퀀스 작업에서 더욱 강력하게 작용합니다. 예를 들어 책을 교과서로 분류할지 여부에 대한 작업을 생각해 보겠습니다. 직관적으로, 교과서라고 말할 수 있는 책의 제목에 대해 생각할 수 있으며(특정 단어는 교과서의 제목에서 더 자주 나타날 수 있음), 책의 표지에 대해 예측 가능한 점이 있다고 생각할 수도 있지만(교과서는 하드 커버가 될 가능성이 더 큼), 실제로 제목과 표지에 있는 단어의 조합이야말로 가장 예측 가능합니다. 실제 사례에서 다음 표는 데카르트 프로세서를 입력 변수 표지 및 제목에 적용한 결과를 보여 줍니다.

교과서제목표지no_punct(제목) 및 표지의 데카르트 곱

1 Economics: Principles, Problems, Policies Hardcover {"Economics_Hardcover", "Principles_Hardcover", "Problems_Hardcover", "Policies_Hardcover"}
0 The Invisible Heart: An Economics Romance Softcover {"The_Softcover", "Invisible_Softcover", "Heart_Softcover", "An_Softcover", "Economics_Softcover", "Romance_Softcover"}
0 Fun With Problems Softcover {"Fun_Softcover", "With_Softcover", "Problems_Softcover"}

다음 예는 var1 및 var2에 대해 데카르트 변환기를 적용하는 방법을 보여 줍니다.

cartesian(var1, var2)

반응형


반응형

Developer Associate



Recommended Path to Prepare for the AWS Certified Developer - Associate Exam


English - https://aws.amazon.com/certification/certification-prep/?nc1=h_ls 

Korean - https://aws.amazon.com/ko/certification/certification-prep/?nc1=h_ls



AWS Certification Frequently Asked Questions (FAQs)


Korean : https://aws.amazon.com/ko/certification/faqs/




AWS Certified Developer - Associate Level Exam Blueprint 

 

http://awstrainingandcertification.s3.amazonaws.com/production/AWS_certified_developer_associate_blueprint.pdf








학습 팁: 다음 백서를 위주로 살펴보십시오.

클라우드에 적합한 아키텍처 설계: AWS 모범 사례 || AWS 보안 모범 사례 || Amazon Web Services: 보안 프로세스의 개요|| AWS Well-Architected Framework || AWS 기반 개발 및 테스트 || AWS를 사용한 백업 및 복구 접근 방식 || Amazon Virtual Private Cloud 연결 옵션 || AWS 요금제 적용 방식

모든 백서 보기


학습 : 다음 FAQ 위주로 살펴보십시오.

Amazon EC2 || Amazon S3 || Amazon VPC || Amazon Route 53 || Amazon RDS || Amazon SQS

모든 FAQ 보기



http://free-braindumps.com/amazon/free-aws-certified-developer-associate-braindumps.html?p=2


Register free membership : http://free-braindumps.com/login.html?ReturnURL=/amazon/free-aws-certified-developer-associate-braindumps.html 


QUESTION: 
A user is running a MySQL RDS instance. The user wil not use the DB for the next 3 months. 
How can the user save costs? 

A. Pause the RDS activities from CLI until it is required in the future 
B. Stop the RDS instance 
C. Create a snapshot of RDS to launch in the future and terminate the instance now 
D. Change the instance size to micro 

Answer(s): 
Explanation: 
The RDS instances unlike the AWS EBS backed instances cannot be stopped or paused. The 
user needs to take the final snapshot, terminate the instance and launch a new instance in the 
future from that snapshot. 
Reference: 
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.BackingUpAndRestoring
AmazonR DSInstances.html 


QUESTION: 
In DynamoDB, if you create a table and request 10 units of write capacity and 200 units of read 
capacity of provisioned throughput, how much would you be charged in US East (Northern 
Virginia) Region? 

A. $0.05 per hour 
B. $0.10 per hour 
C. $0.03 per hour 
D. $0.15 per hour 

Answer(s): 
Explanation: 
To understand pricing in DynamoDB, consider the following example. If you create a table and 
request 10 units of write capacity and 200 units of read capacity of provisioned throughput, you 
would be charged: 
$0.01 + (4 x $0.01) = $0.05 per hour 
Reference: 
http://aws.amazon.com/dynamodb/pricing/ 


QUESTION: 
You have been doing a lot of testing of your VPC Network by deliberately failing EC2 instances 
to test whether instances are failing over properly. Your customer who wil be paying the AWS 
bil for all this asks you if he being charged for all these instances. You try to explain to him how 
the bil ing works on EC2 instances to the best of your knowledge. What would be an appropriate 
response to give to the customer in regards to this? 

A. Bil ing commences when Amazon EC2 AMI instance is completely up and bil ing ends as 
soon as the instance starts to shutdown. 
B. Bil ing commences when Amazon EC2 initiates the boot sequence of an AMI instance and 
bil ing ends when the instance shuts down. 
C. Bil ing only commences only after 1 hour of uptime and bil ing ends when the instance terminates. 
D. Bil ing commences when Amazon EC2 initiates the boot sequence of an AMI instance and 
bil ing ends as soon as the instance starts to shutdown. 

Answer(s): 
Explanation: 
Bil ing commences when Amazon EC2 initiates the boot sequence of an AMI instance. Bil ing 
ends when the instance shuts down, which could occur through a web services command, by 
running "shutdown -h", or through instance failure. 
Reference: 
http://aws.amazon.com/ec2/faqs/#Bil ing 


QUESTION: 
AWS Elastic Load Balancer supports SSL termination. 

A. True. For specific availability zones only. 
B. False 
C. True. For specific regions only 
D. True. For all regions 

Answer(s): 
Explanation: 
You can configure your load balancer in ELB (Elastic Load Balancing) to use a SSL certificate in 
order to improve your system security.The load balancer uses the certificate to terminate and 
then decrypt requests before sending them to the back-end instances. Elastic Load Balancing 
uses AWS Identity and Access Management (IAM) to upload your certificate to your load 
balancer. 
Reference: 
http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_SettingUpLoadB
alancerH TTPS.html 


QUESTION: 
A user has launched five instances with ELB. How can the user add the sixth EC2 instance to 
ELB? 

A. The user can add the sixth instance on the fly. 
B. The user must stop the ELB and add the sixth instance. 
C. The user can add the instance and change the ELB config file. 
D. The ELB can only have a maximum of five instances. 

Answer(s): 
Explanation: 
Elastic Load Balancing automatically distributes incoming traffic across multiple EC2 instances. 
You create a load balancer and register instances with the load balancer in one or more 
Availability Zones. The load balancer serves as a single point of contact for clients. This enables 
you to increase the availability of your application. You can add and remove EC2 instances from 
your load balancer as your needs change, without disrupting the overall flow of information. 
Reference: 
http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/SvcIntro.html 

 

QUESTION: 
An organization has 500 employees. The organization wants to set up AWS access for each 
department. Which of the below mentioned options is a possible solution? 

A. Create IAM roles based on the permission and assign users to each role 
B. Create IAM users and provide individual permission to each 
C. Create IAM groups based on the permission and assign IAM users to the groups 
D. It is not possible to manage more than 100 IAM users with AWS  

Answer(s): 
Explanation: 
An IAM group is a collection of IAM users. Groups let the user specify permissions for a 
collection of users, which can make it easier to manage the permissions for those users. 
Reference: 
http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html 


QUESTION: 
How long can you keep your Amazon SQS messages in Amazon SQS queues? 

A. From 120 secs up to 4 weeks 
B. From 10 secs up to 7 days 
C. From 60 secs up to 2 weeks 
D. From 30 secs up to 1 week 

Answer(s): 
Explanation: 
The SQS message retention period is configurable and can be set anywhere from 1 minute to 2 
weeks. The default is 4 days and once the message retention limit is reached your messages 
wil be automatically deleted. The option for longer message retention provides greater flexibility 
to allow for longer intervals between message production and consumption. 
Reference: 
https://aws.amazon.com/sqs/faqs/ 


QUESTION: 
In regard to DynamoDB, which of the following statements is correct? 

A. An Item should have at least two value sets, a primary key and another attribute. 
B. An Item can have more than one attributes. 
C. A primary key should be single-valued. 
D. An attribute can have one or several other attributes. 

Answer(s): 
Explanation: 
In Amazon DynamoDB, a database is a collection of tables. A table is a collection of items and 
each item is a collection of attributes. 
Reference: 
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html 

 

QUESTION: 
Which one of the following statements is NOT an advantage of DyanamoDB being built on Solid 
State Drives: 

A. serve high-scale request workloads 
B. low request pricing 
C. high I/O performance of WebApp on EC2 instance 
D. low-latency response times 

Answer(s): 
Explanation: 
In DynamoDB, SSDs help achieve design goals of predictable low-latency response times for 
storing and accessing data at any scale. The high I/O performance of SSDs also enables to 
serve high-scale request workloads cost efficiently, and to pass this efficiency along in low 
request pricing. 
Reference: 
http://aws.amazon.com/dynamodb/faqs/ 


QUESTION: 10 
An organization has hosted an application on the EC2 instances. There will be multiple users 
connecting to the instance for setup and configuration of application. The organization is 
planning to implement certain security best practices. Which of the below mentioned pointers 
wil not help the organization achieve better security arrangement? 

A. Apply the latest patch of OS and always keep it updated. 
B. Al ow only IAM users to connect with the EC2 instances with their own secret access key. 
C. Disable the password based login for all the users. Al the users should use their own keys to 
connect with the instance securely. 
D. Create a procedure to revoke the access rights of the individual user when they are not 
required to connect to EC2 instance anymore for the purpose of application configuration. 

Answer(s): 
Explanation: 
Since AWS is a public cloud any application hosted on EC2 is prone to hacker attacks. It 
becomes extremely important for a user to setup a proper security mechanism on the EC2 
instances. A few of the security measures are listed below: 
Always keep the OS updated with the latest patch 
Always create separate users with in OS if they need to connect with the EC2 instances, create 
their keys and disable their password 
Create a procedure using which the admin can revoke the access of the user when the 
business work on the EC2 instance is completed 
Lock down unnecessary ports 
Audit any proprietary applications that the user may be running on the EC2 instance Provide 
temporary escalated privileges, such as sudo for users who need to perform occasional 
privileged tasks 
The IAM is useful when users are required to work with AWS resources and actions, such as 
launching an instance. It is not useful to connect (RDP / SSH) with an instance. 
Reference: 
http://aws.amazon.com/articles/1233/ 


QUESTION: 11 
A user is planning to make a mobile game which can be played online or offline and wil be 
hosted on EC2. The user wants to ensure that if someone breaks the highest score or they 
achieve some milestone they can inform all their colleagues through email. Which of the below 
mentioned AWS services helps achieve this goal? 

A. AWS Simple Workflow Service. 
B. AWS Simple Queue Service. 
C. Amazon Cognito 
D. AWS Simple Email Service. 




Answer(s): 
Explanation: 
Amazon Simple Email Service (Amazon SES) is a highly scalable and cost-effective email-
sending service for businesses and developers. It integrates with other AWS services, making it 
easy to send emails from applications that are hosted on AWS. 
Reference: 
http://aws.amazon.com/ses/faqs/ 


QUESTION: 12 
Which one of the following operations is NOT a DynamoDB operation? 

A. BatchWriteItem 
B. DescribeTable 
C. BatchGetItem 
D. BatchDeleteItem 

Answer(s): 
Explanation: 
In DynamoDB, DeleteItem deletes a single item in a table by primary key, but BatchDeleteItem 
doesn't exist. 
Reference: 
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/operationlist.html 


QUESTION: 13 
True or False: In DynamoDB, Scan operations are always eventual y consistent. 

A. No, scan is like Query operation 
B. Yes 
C. No, scan is strongly consistent by default 
D. No, you can optionally request strongly consistent scan. 

Answer(s): 
Explanation: 
In DynamoDB, Scan operations are always eventual y consistent.  
Reference: 
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/APISummary.html 


QUESTION: 14 
Regarding Amazon SNS, when you want to subscribe to a topic and receive notifications to your 
email, in the Protocol drop-down box, you should select _______. 

A. Email 
B. Message 
C. SMTP 
D. IMAP 

Answer(s): 
Explanation: 
In Amazon SNS, when you want to subscribe to a topic and receive notifications to your email, 
select Email in the Protocol drop-down box. Enter an email address you can use to receive the 
notification in the Endpoint field. 
Reference: 
http://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html 


QUESTION: 15 
In Amazon EC2, which of the following is the type of monitoring data for Amazon EBS volumes 
that is available automatically in 5-minute periods at no charge? 

A. Primary 
B. Basic 
C. Initial 
D. Detailed 

Answer(s): 
Explanation: 
Basic is the type of monitoring data (for Amazon EBS volumes) which is available automatically 
in 5-minute periods at no charge called. 
Reference: 
http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html 


QUESTION: 16 
In DynamoDB, to get a detailed listing of secondary indexes on a table, you can use the _____ 
action. 

A. DescribeTable 
B. BatchGetItem 
C. GetItem 
D. TableName 

Answer(s): 
Explanation: 
In DynamoDB, DescribeTable returns information about the table, including the current status of 
the table, when it was created, the primary key schema, and any indexes on the table. 

 

Reference: 
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SecondaryIndexes.html 


QUESTION: 17 
A user has launched an EC2 instance. However, due to some reason the instance was 
terminated. If the user wants to find out the reason for termination, where can he find the 
details? 

A. The user can get information from the AWS console, by checking the Instance description 
under the State transition reason label 
B. The user can get information from the AWS console, by checking the Instance description 
under the Instance Termination reason label 
C. The user can get information from the AWS console, by checking the Instance description 
under the Instance Status Change reason label 
D. It is not possible to find the details after the instance is terminated 

Answer(s): 
Explanation: 
An EC2 instance, once terminated, may be available in the AWS console for a while after 
termination. The user can find the details about the termination from the description tab under 
the label State transition reason. If the instance is stil running, there wil be no reason listed. If 
the user has explicitly stopped or terminated the instance, the reason wil be "User initiated 
shutdown". 
Reference: 
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.
html 


QUESTION: 18 
___________ is a task coordination and state management service for cloud applications. 

A. Amazon SES 
B. Amazon SWF 
C. Amazon FPS 
D. Amazon SNS 

Answer(s): 
Explanation: 
Amazon Simple Workflow (Amazon SWF) is a task coordination and state management service 
for cloud applications. With Amazon SWF, you can stop writing complex glue-code and state 
machinery and invest more in the business logic that makes your applications unique. 
Reference: 
http://aws.amazon.com/swf/ 


QUESTION: 19 
When you create a table with a hash-and-range key, you must define one or more secondary 
indexes on that table. 

A. False, hash-range key is another name for secondary index 

 

B. False, it is optional 
C. True 
D. False, when you have Hash-Range key you cannot define Secondary index 

Answer(s): 
Explanation: 
When you create a table with a hash-and-range key in DynamoDB, you can also define one or 
more secondary indexes on that table. 
Reference: 
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html 


QUESTION: 20 
A user is planning to create a structured database in the cloud. Which of the below mentioned 
AWS offerings help the user achieve the goal? 

A. AWS DynamoDB 
B. AWS RDS 
C. AWS SimpleDB 
D. AWS RSD 

Answer(s): 
Explanation: 
AWS RDS is a managed database server offered by AWS, which makes it easy to set up, 
operate, and scale a relational database or structured data in cloud.  
Reference: 
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html 


QUESTION: 21 
A user has created a MySQL RDS instance with PIOPS. Which of the below mentioned 
statements wil help user understand the advantage of PIOPS? 

A. The user can achieve additional dedicated capacity for the EBS I/O with an enhanced RDS 
option 
B. It uses optimized EBS volumes and optimized configuration stacks 
C. It provides a dedicated network bandwidth between EBS and RDS 
D. It uses a standard EBS volume with optimized configuration the stacks 

Answer(s): 
Explanation: 
RDS DB instance storage comes in two types: standard and provisioned IOPS. Standard 
storage is allocated on the Amazon EBS volumes and connected to the user's DB instance. 
Provisioned IOPS uses optimized EBS volumes and an optimized configuration stack. It 
provides additional, dedicated capacity for the EBS I/O. 
Reference: 
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html 


QUESTION: 22 
A user is accessing an EC2 instance on the SSH port for IP 10.20.30.40. Which one is a secure 

 

way to configure that the instance can be accessed only from this IP? 

A. In the security group, open port 22 for IP 10.20.30.40/0 
B. In the security group, open port 22 for IP 10.20.30.40/32 
C. In the security group, open port 22 for IP 10.20.30.40/24  
D. In the security group, open port 22 for IP 10.20.30.40 

Answer(s): 
Explanation: 
In AWS EC2, while configuring a security group, the user needs to specify the IP address in 
CIDR notation. The CIDR IP range 10.20.30.40/32 says it is for a single IP 10.20.30.40. If the 
user specifies the IP as 10.20.30.40 only, the security group will not accept and ask it in a CIRD 
format.  
Reference: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-
security.html 


QUESTION: 23 
When a user is detaching an EBS volume from a running instance and attaching it to a new 
instance, which of the below mentioned options should be followed to avoid file system 
damage? 

A. Unmount the volume first 
B. Stop all the I/O of the volume before processing 
C. Take a snapshot of the volume before detaching 
D. Force Detach the volume to ensure that all the data stays intact 

Answer(s): 
Explanation: 
When a user is trying to detach an EBS volume, the user can either terminate the instance or 
explicitly remove the volume. It is a recommended practice to unmount the volume first to avoid 
any file system damage. 
Reference: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-
volume.html 


QUESTION: 24 
A user is planning to host a scalable dynamic web application on AWS. Which of the services 
may not be required by the user to achieve automated scalability? 

A. CloudWatch 
B. S3 
C. AutoScaling 
D. AWS EC2 instances 

Answer(s): 
Explanation: 
The user can achieve automated scaling by launching different EC2 instances and making them 
a part of an ELB. Cloudwatch wil be used to monitor the resources and based on the scaling 
need it wil trigger policies. AutoScaling is then used to scale up or down the instances. 
Reference: 
http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/WhatIsAutoScaling.html 


QUESTION: 25 
Which one of the following data types does Amazon DynamoDB not support? 

A. Arrays 
B. String 
C. Binary 
D. Number Set 

Answer(s): 
Explanation: 
Amazon DynamoDB supports the following data types: 
Scalar data types (like Number, String, and Binary) 
Multi-valued types (like String Set, Number Set, and Binary Set). 
Reference: 
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModel.Data Types 


QUESTION: 26 
Regarding Amazon SNS, you can send notification messages to mobile devices through any of 
the following supported push notification services, EXCEPT: 

A. Google Cloud Messaging for Android (GCM) 
B. Apple Push Notification Service (APNS) 
C. Amazon Device Messaging (ADM) 
D. Microsoft Windows Mobile Messaging (MWMM) 

Answer(s): 
Explanation: 
In Amazon SNS, you have the ability to send notification messages directly to apps on mobile 
devices. Notification messages sent to a mobile endpoint can appear in the mobile app as 
message alerts, badge updates, or even sound alerts. Microsoft Windows Mobile Messaging 
(MWMM) doesn't exist and is not supported by Amazon SNS. 
Reference: 
http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html 


QUESTION: 27 
A user plans to use RDS as a managed DB platform. Which of the below mentioned features is 
not supported by RDS? 

A. Automated backup 
B. Automated scaling to manage a higher load 
C. Automated failure detection and recovery 
D. Automated software patching 

Answer(s): 
Explanation: AWS RDS provides a managed DB platform, which offers features, such as automated backup, 
patch management, automated failure detection and recovery. The scaling is not automated and 
the user needs to plan it with a few clicks. 
Reference: 
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html 


QUESTION: 28 
A user has not enabled versioning on an S3 bucket. What wil be the version ID of the object 
inside that bucket? 

A. 0 
B. There wil be no version attached 
C. Null 
D. Blank 

Answer(s): 
Explanation: 
S3 objects stored in the bucket before the user has set the versioning state have a version ID of 
nul . When the user enables versioning, the objects in the bucket do not change and their ID 
remains null. 
Reference: 
http://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersionSuspendedBuckets.
html 


QUESTION: 29 
A user has created a queue named "myqueue" with SQS. There are four messages published 
to queue which are not received by the consumer yet. If the user tries to delete the queue, what 
wil happen? 

A. A user can never delete a queue manual y. AWS deletes it after 30 days of inactivity on 
queue 
B. It will initiate the delete but wait for four days before deleting until all messages are deleted 
automatically. 
C. It wil ask user to delete the messages first 
D. It wil delete the queue 

Answer(s): 
Explanation: 
SQS allows the user to move data between distributed components of applications so they can 
perform different tasks without losing messages or requiring each component to be always 
available. The user can delete a queue at any time, whether it is empty or not. It is important to 
note that queues retain messages for a set period of time. By default, a queue retains 
messages for four days. 
Reference: 
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSConce
pts.html 


QUESTION: 30 

What happens if your application performs more reads or writes than your provisioned capacity? 

A. Nothing 
B. requests above your provisioned capacity wil be performed but you wil receive 400 error 
codes. 
C. requests above your provisioned capacity wil be performed but you will receive 200 error 
codes. 
D. requests above your provisioned capacity wil be throttled and you wil receive 400 error 
codes. 

Answer(s): 
Explanation: 
Speaking about DynamoDB, if your application performs more reads/second or writes/second 
than your table's provisioned throughput capacity allows, requests above your provisioned 
capacity wil be throttled and you wil receive 400 error codes. 
Reference: 
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIn
tro.html 

QUESTION: 31 
In relation to Amazon SQS, how can you ensure that messages are delivered in order? 

A. Increase the size of your queue 
B. Send them with a timestamp 
C. Give each message a unique id. 
D. AWS cannot guarantee that you wil receive messages in the exact order you sent them 

Answer(s): 
Explanation: 
Amazon SQS makes a best effort to preserve order in messages, but due to the distributed 
nature of the queue, AWS cannot guarantee that you will receive messages in the exact order 
you sent them. You typically place sequencing information or timestamps in your messages so 
that you can reorder them upon receipt. 
Reference: 
https://aws.amazon.com/items/1343?externalID=1343 


QUESTION: 32 
An organization has launched two applications: one for blogging and one for ECM on the same 
AWS Linux EC2 instance running in the AWS VPC. The organization has attached two private 
IPs (primary and secondary) to the above mentioned instance. The organization wants the 
instance OS to recognize the secondary IP address. How can the organization configure this? 

A. Use the ec2-net-utility package which updates routing tables, uses DHCP to refresh the 
secondary IP and adds the network interface. 
B. Use the ec2-net-utils package which wil configure an additional network interface and update 
the routing table 
C. Use the ec2-ip-update package which can configure the network interface as well as update 
the secondary IP with DHCP. 
D. Use the ec2-ip-utility package which can update the routing tables as well as refresh the secondary IP using DHCP. 

Answer(s): 
Explanation: 
A Virtual Private Cloud (VPC) is a virtual network dedicated to the user's AWS account. It 
enables the user to launch AWS resources into a virtual network that the user has defined. With 
VPC the user can specify multiple private IP addresses for his instances. The number of 
network interfaces and private IP addresses that a user can specify for an instance depends on 
the instance type. This scenario helps when the user wants to host multiple websites on a single 
EC2 instance. After the user has assigned a secondary private IP address to his instance, he 
needs to configure the operating system on that instance to recognize the secondary private IP 
address. For AWS Linux, the ec2-net-utils package can take care of this step. It configures 
additional network interfaces that the user can attach while the instance is running, refreshes 
secondary IP addresses during DHCP lease renewal, and updates the related routing rules. 
Reference: 
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/MultipleIP.html 

QUESTION: 33 
What kind of service is provided by AWS DynamoDB? 

A. Relational Database 
B. NoSQL Database 
C. Dynamic Database 
D. Document Database 

Answer(s): 
Explanation: 
DynamoDB is a fast, fully managed NoSQL database service. 
Reference: 
http://aws.amazon.com/dynamodb/ 

QUESTION: 34 
In relation to Amazon SQS, how many queues and messages can you have per queue for each 
user? 

A. Unlimited 
B. 10 
C. 256 
D. 500 

Answer(s): 
Explanation: 
Amazon SQS supports an unlimited number of queues and unlimited number of messages per 
queue for each user. Please be aware that Amazon SQS automatical y deletes messages that 
have been in the queue for more than 4 days. 
Reference:  
https://aws.amazon.com/items/1343?externalID=1343 

 

QUESTION: 35 
Doug has created a VPC with CIDR 10.201.0.0/16 in his AWS account. In this VPC he has 
created a public subnet with CIDR block 10.201.31.0/24. While launching a new EC2 from the 
console, he is not able to assign the private IP address 10.201.31.6 to this instance. Which is 
the most likely reason for this issue? 

A. Private IP address 10.201.31.6 is not part of the associated subnet's IP address range. 
B. Private IP address 10.201.31.6 is blocked via ACLs in Amazon infrastructure as a part of 
platform security. 
C. Private address IP 10.201.31.6 is currently assigned to another interface. 
D. Private IP address 10.201.31.6 is reserved by Amazon for IP networking purposes. 

Answer(s): 
Explanation: 
In Amazon VPC, you can assign any Private IP address to your instance as long as it is: 
Part of the associated subnet's IP address range 
Not reserved by Amazon for IP networking purposes 
Not currently assigned to another interface 
Reference:  
http://aws.amazon.com/vpc/faqs/ 

QUESTION: 36 
Regarding Amazon SQS, are there restrictions on the names of Amazon SQS queues? 

A. No 
B. Yes. Queue names must be unique within an AWS account and you cannot use hyphens (-) 
and underscores (_) 
C. Yes. Queue names are limited to 80 characters and queue names must be unique within an 
AWS account 
D. Yes. Queue names are limited to 80 characters but queue names do not need to be unique 
within an AWS account 

Answer(s): 
Explanation: 
Queue names are limited to 80 characters. Alphanumeric characters plus hyphens (-) and 
underscores (_) are allowed. Queue names must be unique within an AWS account. After you 
delete a queue, you can reuse the queue name. 
Reference:  
https://aws.amazon.com/sqs/faqs/ 

QUESTION: 37 
In Amazon SNS, to send push notifications to mobile devices using Amazon SNS and ADM, you 
need to obtain the following, except: 

A. Client secret 
B. Client ID 
C. Device token 
D. Registration ID 

Answer(s): 
Explanation: 
To send push notifications to mobile devices using Amazon SNS and ADM, you need to obtain 
the following: Registration ID and Client secret. 
Reference:  
http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushPrereq.html 

QUESTION: 38 
Regarding Amazon SNS, to begin using Amazon SNS mobile push notifications, you first need 
__________that uses one of the supported push notification services: APNS, GCM, or ADM. 

A. an access policy for the mobile endpoints 
B. to active push notification service of Amazon SNS 
C. to know the type of mobile device operating system 
D. an app for the mobile endpoints 

Answer(s): 
Explanation: 
In Amazon SNS, to begin using Amazon SNS mobile push notifications, you first need an app 
for the mobile endpoints that uses one of the supported push notification services: APNS, GCM, 
or ADM. After you've registered and configured the app to use one of these services, you 
configure Amazon SNS to send push notifications to the mobile endpoints. 
Reference:  
http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html 

QUESTION: 39 
How many types of block devices does Amazon EC2 support? 

A. 5 
B. 1 
C. 2 
D. 4 

Answer(s): 
Explanation: 
Amazon EC2 supports 2 types of block devices. 
Reference: 
http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/block-device-mapping-
concepts.html 

QUESTION: 40 
ExamKiller (with AWS account ID 111122223333) has created 50 IAM users for its 
organization's employees. ExamKil er wants to make the AWS console login URL for all IAM 
users as: https:// 
examkil er.signin.aws.amazon.com/console/. How can this be configured? 

A. Create a bucket with the name ExamKil er and map it with the IAM alias 
B. It is not possible to have capital letters as a part of the alias name 

C. The user needs to use Route 53 to map the ExamKil er domain and IAM URL 
D. For the AWS account, create an alias ExamKil er for the IAM login 

Answer(s): 
Explanation: 
If a user wants the URL of the AWS IAM sign-in page to have the company name instead of the 
AWS account ID, he can create an alias for his AWS account ID. The alias must be unique 
across all Amazon Webservices products and contain only digits, lowercase letters, and 
hyphens.  
Reference:  
http://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html 

QUESTION: 41 
Can a user get a notification of each instance start / terminate configured with Auto Scaling? 

A. Yes, always 
B. No 
C. Yes, if configured with the Auto Scaling group 
D. Yes, if configured with the Launch Config 

Answer(s): 
Explanation: 
The user can get notifications using SNS if he has configured the notifications while creating the 
Auto Scaling group. 
Reference: 
http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/GettingStartedTutorial.html 
QUESTION: 42 
AutoScaling is configured with 3 AZs. Each zone has 5 instances running. If AutoScaling wants 
to terminate an instance based on the policy action, which instance wil it terminate first? 

A. Terminate the first launched instance 
B. Randomly select the instance for termination 
C. Terminate the instance from the AZ which does not have a high AWS load 
D. Terminate the instance from the AZ which has instances running near to the bil ing hour 

Answer(s): 
Explanation: 
Before Auto Scaling selects an instance to terminate, it first identifies the Availability Zone that 
has more instances than the other Availability Zones used by the group. If all the Availability 
Zones have the same number of instances, it identifies a random Availability Zone.  
Reference:  
http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/us-termination-policy.html 

QUESTION: 43 
In regard to DynamoDB, can I delete local secondary indexes? 

A. Yes, if it is a primary hash key index 

B. No 
C. Yes, if it is a local secondary indexes 
D. Yes, if it is a Global secondary indexes 

Answer(s): 
Explanation: 
In DynamoDB, an index cannot be modified once it is created.  
Reference:  
http://aws.amazon.com/dynamodb/faqs/#security_anchor 

QUESTION: 44 
You need to develop and run some new applications on AWS and you know that Elastic 
Beanstalk and CloudFormation can both help as a deployment mechanism for a broad range of 
AWS resources. Which of the following statements best describes the differences between 
Elastic Beanstalk and CloudFormation? 

A. Elastic Beanstalk uses Elastic load balancing and CloudFormation doesn't. 
B. CloudFormation is faster in deploying applications than Elastic Beanstalk. 
C. CloudFormation is much more powerful than Elastic Beanstalk, because you can actual y 
design and script custom resources 
D. Elastic Beanstalk is faster in deploying applications than CloudFormation. 

Answer(s): 
Explanation: 
These services are designed to complement each other. AWS Elastic Beanstalk provides an 
environment to easily develop and run applications in the cloud. It is integrated with developer 
tools and provides a one-stop experience for you to manage the lifecycle of your applications. 
AWS CloudFormation is a convenient deployment mechanism for a broad range of AWS 
resources. It supports the infrastructure needs of many different types of applications such as 
existing enterprise applications, legacy applications, applications built using a variety of AWS 
resources and container-based solutions (including those built using AWS Elastic Beanstalk). 
AWS CloudFormation introduces two new concepts: The template, a JSON-format, text-based 
file that describes all the AWS resources you need to deploy to run your application and the 
stack, the set of AWS resources that are created and managed as a single unit when AWS 
CloudFormation instantiates a template. 
Reference:  
http://aws.amazon.com/cloudformation/faqs/ 



QUESTION: 45 
Can you SSH to your private machines that reside in a VPC from outside without elastic IP? 

A. Yes, but only if you have direct connect or vpn 
B. Only if you are using a non-US region 
C. Only if you are using a US region 
D. No 

Answer(s): 
Explanation: 
The instances that reside in the private subnets of your VPC are not reachable from the Internet, meaning that is not possible to ssh into them. To interact with them you can use a 
bastion server, located in a public subnet, that will act as a proxy for them. 
You can also connect if you have direct connect or vpn. 
Reference:  
http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario2.html 

QUESTION: 46 
Does AWS CloudFormation support Amazon EC2 tagging? 

A. It depends if the Amazon EC2 tagging has been defined in the template. 
B. No, it doesn't support Amazon EC2 tagging. 
C. No, CloudFormation doesn't support any tagging 
D. Yes, AWS CloudFormation supports Amazon EC2 tagging 

Answer(s): 
Explanation: 
In AWS CloudFormation, Amazon EC2 resources that support the tagging feature can also be 
tagged in an AWS template. The tag values can refer to template parameters, other resource 
names, resource attribute values (e.g. addresses), or values computed by simple functions 
(e.g., a concatenated list of strings). 
Reference:  
http://aws.amazon.com/cloudformation/faqs/ 

QUESTION: 47 
A user has created a MySQL RDS instance. Which of the below mentioned options is 
mandatory to configure while creating an instance? 

A. Multi AZ deployment setup 
B. Automated backup window 
C. Availability Zone 
D. Maintenance window 

Answer(s): 
Explanation: 
When creating an RDS instance, the user needs to specify whether it is Multi AZ or not. If the 
user does not provide the value for the zone, the maintenance window or automated backup 
window, RDS wil automatical y select the value. 
Reference:  
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html 

QUESTION: 48 
A user has enabled the automated backup, but not specified the backup window. What wil RDS 
do in this case? 

A. Wil throw an error on instance launch 
B. RDS wil take 3 AM - 3:30 AM as the default window 
C. RDS assigns a random time period based on the region 
D. Wil not allow to launch a DB instance 

Answer(s): 
Explanation: 
If the user does not specify a preferred backup window while enabling an automated backup, 
Amazon RDS assigns a default 30-minute backup window which is selected at random from an 
8-hour block of time per region. 
Reference: 
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.BackingUpAndRestoring
AmazonR DSInstances.html 

QUESTION: 49 
A user is planning to host a web server as well as an app server on a single EC2 instance which 
is a part of the public subnet of a VPC. How can the user setup to have two separate public IPs 
and separate security groups for both the application as well as the web server? 

A. Launch a VPC instance with two network interfaces. Assign a separate security group to 
each and AWS wil assign a separate public IP to them. 
B. Launch VPC with two separate subnets and make the instance a part of both the subnets. 
C. Launch a VPC instance with two network interfaces. Assign a separate security group and 
elastic IP to them. 
D. Launch a VPC with ELB such that it redirects requests to separate VPC instances of the 
public subnet. 

Answer(s): 
Explanation: 
If you need to host multiple websites(with different IPs) on a single EC2 instance, the following 
is the suggested method from AWS. 
Launch a VPC instance with two network interfaces 
Assign elastic IPs from VPC EIP pool to those interfaces (Because, when the user has attached 
more than one network interface with an instance, AWS cannot assign public IPs to them.) 
Assign separate Security Groups if separate Security Groups are needed This scenario also 
helps for operating network appliances, such as firewalls or load balancers that have multiple 
private IP addresses for each network interface.  
Reference:  
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/MultipleIP.html 

QUESTION: 50 
An online gaming site asked you if you can deploy a database that is a fast, highly scalable 
NoSQL database service in AWS for a new site that he wants to build. Which database should 
you recommend? 

A. Amazon Redshift 
B. Amazon SimpleDB 
C. Amazon DynamoDB 
D. Amazon RDS 

Answer(s): 
Explanation: 
Amazon DynamoDB is ideal for database applications that require very low latency and predictable performance at any scale but don't need complex querying capabilities like joins or 
transactions. Amazon DynamoDB is a fully-managed NoSQL database service that offers high 
performance, predictable throughput and low cost. It is easy to set up, operate, and scale. With 
Amazon DynamoDB, you can start small, specify the throughput and storage you need, and 
easily scale your capacity requirements on the fly. Amazon DynamoDB automatically partitions 
data over a number of servers to meet your request capacity. In addition, DynamoDB 
automatically replicates your data synchronously across multiple Availability Zones within an 
AWS Region to ensure high-availability and data durability. 
Reference:  
https://aws.amazon.com/running_databases/#dynamodb_anchor 

QUESTION: 51 
How long are the messages kept on an SQS queue by default? 

A. If a message is not read, it is never deleted 
B. 2 weeks 
C. 1 day 
D. 4 days 

Answer(s): 
Explanation: 
The SQS message retention period is configurable and can be set anywhere from 1 minute to 2 
weeks. The default is 4 days and once the message retention limit is reached your messages 
wil be automatically deleted. The option for longer message retention provides greater flexibility 
to allow for longer intervals between message production and consumption. 
Reference:  
https://aws.amazon.com/sqs/faqs/ 

QUESTION: 52 
Regarding Amazon SWF, the coordination logic in a workflow is contained in a software 
program called a ________. 

A. Handler 
B. Decider 
C. Cordinator 
D. Worker 

Answer(s): 
Explanation: 
In Amazon SWF, the coordination logic in a workflow is contained in a software program called 
a decider. The decider schedules activity tasks, provides input data to the activity workers, 
processes events that arrive while the workflow is in progress, and ultimately ends (or closes) 
the workflow when the objective has been completed. 
Reference:  
http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-intro-to-swf.html 

QUESTION: 53 
A user has attached one RDS security group with 5 RDS instances. The user has changed the ingress rule for the security group. What wil be the initial status of the ingress rule? 

A. Approving 
B. Implementing 
C. Authorizing 
D. It is not possible to assign a single group to multiple DB instances 

Answer(s): 
Explanation: 
When the user makes any changes to the RDS security group the rule status will be authorizing 
for some time until the changes are applied to all instances that the group is connected with. 
Once the changes are propagated the rule status wil change to authorized. 
Reference: 
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithSecurityGroup
s.html 

QUESTION: 54 
A user has attached an EBS volume to a running Linux instance as a "/dev/sdf" device. The 
user is unable to see the attached device when he runs the command "df -h". What is the 
possible reason for this? 

A. The volume is not in the same AZ of the instance 
B. The volume is not formatted 
C. The volume is not attached as a root device 
D. The volume is not mounted 

Answer(s): 
Explanation: 
When a user creates an EBS volume and attaches it as a device, it is required to mount the 
device. If the device/volume is not mounted it wil not be available in the listing.  
Reference:  
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html 

QUESTION: 55 
A user has setup an application on EC2 which uses the IAM user access key and secret access 
key to make secure calls to S3. The user wants to temporarily stop the access to S3 for that 
IAM user. What should the root owner do? 

A. Delete the IAM user 
B. Change the access key and secret access key for the users 
C. Disable the access keys for the IAM user 
D. Stop the instance 

Answer(s): 
Explanation: 
If the user wants to temporarily stop the access to S3 the best solution is to disable the keys. 
Deleting the user wil result in a loss of all the credentials and the app will not be useful in the 
future. If the user stops the instance IAM users can stil access S3. The change of the key does 
not help either as they are stil active. The best possible solution is to disable the keys. 



반응형
이전 1 2 다음