SDLC Methodlogies
Water fall
Agile
Phases of development
Code, build, test, deploy, maintain
Code
Write code and check into a source repository, code commit, git.
Build
Code is compiled
Test
Code is tested perhaps automatically.
Deploy
Code gest placed in production environment.
Maintain. Make sure code is working correctly.
Getting started.
1) AWS account
2) Create IAM user.
3) Install SDK
4) AWS Permissions
1) Authentication Identity who can access.
2) Create IAM cuser
3) Install SDK for programming language of your choice.
AWS Cloud 9
Browser based IDE . Can connect to EC2 Instance or some or our own server.
Working with AWS SDK
Interaction via the Mgmt console. Or programmatically via
1) CLI
2) SDK
3) API
Command line tools
1) CLI
Command line format
aws ec2 stopinstances --instance-id
Service command sub command
2) AWS PowerShell
3) AWS SAML
4) AWS Amplify
ARN name format
Lets us specify a resource without ambiguity.
aws: partition service region account resource
aws dynamodb us-west-1 1234 table/accounts
aws s3 : : : mybucket
Working with SDK's
Call s SDK
This in turn will make use of one or more API's calls.
This involves making the http request and response.
The result is passed to the user via the original sdk call.
Client API
One function call.
SDK 2 levels .
Client class has a mapping for a service to an object.
Low Level
AmazonS3Client
AmazonDynamoDBClient
s3Client = boto3.client( 's3' ) ;
response = s3client.list_objects_v2(Bucket='myBucket')
Response API higher level
s3resource = boto3.resource('s3')
bucket = s3resource.bucket( 'mybucket' )
Specifying the region
Java and .Net
At the time of the call or soon after.
Pythion
Set it in the file:
~/.aws/config
Errors and Exceptions
Successful call returns 200 . Error code is 400 or 500. 400 is client error and 500 is server error.
Error
Code: No such key
Message: The resource does not exist.
Resource: /mybucket/photo.jpg
Request Id Id of the request associated with the error.
Example 404 error bucket we are trying to access does not exist.
500 Error
Error at the server side. We can retry the API call . We can also configure the number of retry attempts.
Java
Service received the request but did not
process it.
AmazonServiceException
Amazon ClientException
Problem occurred in the client java code.
java.lang.IllegalArgumentException
Happens if we pass an illegal argument
.Net
Amazon.Runtime.AmazonServiceException
Amazon.Runtime.AmazonClientException
AWS X-ray
X-Ray
Service Map
Dependency tree.Latency errors.
Errors and Bugs
Analyze the response code.
Performance bottlenects
Relationship between services and resources.
Build analysis
X-Ray provides query APIs
CloudWatch
Collects and track metrics
Monitors and stores logs
Monitor CPU memory, disk I/O network
Set alarms and react to changes
View graphs and statistics
CloudTrail
Compliance auditing
Operatinal troubleshooting
Log account activity
View recent events.
Analyze log files.
Actions taken by a user in AWS mgmt console, CLI, SDK or API .
Events get recorded in logs. We can view the events in event history.
CloudWatch and CloudTrail
Deploy
c
SDK
Errors and Exceptions
X-Ray
CloudWatch and CloudTrail
Cloud 9