Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts

Tuesday 28 July 2020

Change Instance type of AWS server









Modify instance type with a simple few console clicks. By changing Instance type, we can change the CPU core and RAM of AWS instance.

Procedure

  1. Login to AWS management console https://console.aws.amazon.com/ec2/
  2. In the left navigation pane, choose Instances.
  3. Select your instance whose instance type needs to change.
  4. Click on Actions > select Instance state > click Stop
  5. After stopping the aws instance again Click on Actions > Instance Settings > select Change Instance Type
  6. Select required Instance type from drop down list > Click Apply
  7. Again click on Actions > Instance State > click Start

Rollback Plan

  1. Login to AWS management console https://console.aws.amazon.com/ec2/
  2. In the left navigation pane, choose Instances.
  3. Select your instance whose instance type needs to change to previous one.
  4. Click on Actions > select Instance state > click Stop
  5. After stopping the aws instance again Click on Actions > Instance Settings > select Change Instance Type to previous one
  6. Select previous Instance type from drop down list > Click Apply
  7. Again click on Actions > Instance State > click Start

Monday 27 July 2020

How to Resize EBS_data partition of AWS database instance









Modify configurations of live volumes with a simple few console clicks. Elastic Volumes makes it easy to dynamically increase capacity of any new or existing current generation volume with no downtime or performance impact.


Make note of pg_data Volume.

  1. Login to Instance using ssh.
  2. Please make a note of /dev/xvd<x>.

Make note of pg_data partition EBS ID.

  1. Login to the AWS EC2 console. https://console.aws.amazon.com/ec2
  2. In the left navigation pane, choose Instance.
  3. Select your instance.
  4. Under Block devices, click the device name, and note EBS ID. (Note EBS ID of device which you are going to increase, other than root device.)

Plan

Modify the Volume Size.

  1. Login to the AWS EC2 console. https://console.aws.amazon.com/ec2
  2. In the left navigation pane, choose Instance.
  3. Select your instance.
  4. In the left navigation pane, choose Volume.
  5. Select the currently attached volume with EBS ID which you have noted in Preparation step 4 and choose Actions, Modify Volume.
  6. In Size tab , Increase the size specify by DBA ( For eg: Current Size is 250GiB and DBA requested to increase by 50GiB then in Size tab the new size will be 300GiB )
  7. Click on Modify and Yes.

Resize the Volume.

  1. Login to Instance using ssh.
  2. Resize the file system.
    resize2fs /dev/xvd<x> 

Tuesday 22 May 2018

What is AWS SAM (Serverless Application Model)?









In this blog post we are going to discuss about Amazon web services serverless application model. Recently Amazon web services has released an open source lambda based serverless infrastructure named as Serverless Application Model (SAM). AWS SAM runtime application model powers it’s lambda functions-as-a-service (FaaS) model.
What is serverless application model?
Serverless application model enables organizations to develop, build and run applications without thinking much about servers. The big advantage of building and running serverless application is, you don’t require to equip and manage servers. With serverless application model, you can build and run any kind of application or services with high availability.
Why we use serverless application model?
Serverless application model reduces the overhead of managing and running servers in the cloud and on-premises. This act enhances developers productivity to focus more on core development areas to deliver a great product. No servers overhead, flexible scaling of applications, and high availability of service are the benefits of the serverless application model.
What is AWS Serverless Application Model?
Have you ever thought of building and running applications without a server? Yes, that’s right with the help of serverless architecture we can build and run the applications and services. The serverless architecture is a revolutionary addition to the cloud computing technology.
AWS is one of the early adopters of serverless architecture and created serverless application model named as AWS SAM. AWS serverless application model is used to create serverless applications. AWS SAM extended from CloudFormation and defines simpler code functions for creating serverless resources and it also supports APIs, Lambda functions, mappings and, DynamoDB database tables.
AWS serverless application uses API Gateway, S3 object storage, and DynamoDB database tables as components. See below for complete list of AWS SAM components.
Architectural Components of AWS SAM
  • API Actions
  • AWS S3 Objects
  • DynamoDB Database Tables
  • CloudWatch Events
  • Amazon Kinesis Objects
  • Amazon SNS Notifications
  • AWS IoT Rules
  • Alexa Events
AWS SAM is based on CloudFormation, AWS SAM uses JSON or YAML to create templates. These templates files are nothing but CloudFormation templates.
In AWS SAM you can include various new resources and property types in the resources section of the template. You can also include other template sections and intrinsic functions of CloudFormation to access properties only at runtime.
In CloudFormation template, you can include objects defined from AWS SAM by creating transform section in the template in the root document with a value of AWS::Serverless-2018-05-07.
Different Resource Types
  • Resource types
  • Event source types
  • Property types
  • Globals Section
Example: AWS SAM Sample Template
AWSTemplateFormatVersion: '2018-02-05'
 
Transform: 'AWS::Serverless-2018-05-07'
 
Resources:
 
 MyFunction:
 
   Type: 'AWS::Serverless::Function'
 
   Properties:
 
     Handler: index.handler
 
     Runtime: nodejs6.10
 
     CodeUri: 's3://my-bucket/function.zip'
All property names in AWS SAM are case sensitive.
Globals Section in AWS SAM Template
In AWS SAM template Globals is a section to create properties common to all the Serverless Function and APIs.
All the AWS::Serverless::Function and AWS::Serverless::Api resources will inherit the properties defined here.
Globals Example:
Globals:
 
 Function:
 
   Runtime: nodejs6.10
 
   Timeout: 180
 
   Handler: index.handler
 
   Environment:
 
     Variables:
 
       TABLE_NAME: data-table
 
 Api:
 
   EndpointConfiguration: REGIONAL
 
   Cors: "'www.example.com'"
 
Resource types
 
AWS::Serverless::Function
 
AWS::Serverless::Api
 
AWS::Serverless::SimpleTable
Benefits of AWS SAM
AWS users already taking advantage of AWS serverless architecture. With AWS SAM, you can develop, test, build and deploy applications without thinking much about infrastructure provisioning.
  • Get rid of server overheads
  • Rapid application development
  • Reduced product development costs
  • Flexible scaling of applications
  • High availability of service
AWS SAM helps you to create, test, build and deploy applications without servers, this will reduce the burden on developers to focus more on application development. Serverless architecture is still in initial stages and its landscape is going to evolve with the ecosystem of tools and processes. We hope that you understood the AWS SAM concept clearly if you have any question on AWS serverless architecture, please leave your comment in the below comment section. We will get back to you as soon as possible.