Heath Dorn

DevOps :

To compete in the market and reduce software delivery time, software development organizations are continuously in search of efficient and effective software’s processes and techniques that can facilitate them in achieving this goal. Existing models face significant difficulties such as keeping up with the demands for faster delivery, scalability, and continuous integration and delivery. Customers have high expectations when they go for software development and require high quality software in short time. However, with ever-growing need of rapid development of quality products, software organizations are adopting new platforms, techniques and practices which may provide a way to address the limitations of exiting techniques.  In this regard, DevOps is considered a potential solution which offers processes that enable efficient development and promote the atmosphere of mutual collaboration and effective communication by integrating development and operational teams.

DevOps support Continuous Integration, Continuous Delivery, and Continuous Deployment are widely recognized as the most popular DevOps  practices.

Step 1: Setting up the Hello World Application

First, ensure you have the AWS SAM CLI installed on your local machine. If not, you can install it by following the instructions in the AWS SAM CLI documentation.

Once installed, open your command line interface and navigate to the directory where you want to create your project.

Run the following command to initialize the sample Hello World application

During initialization, you’ll be prompted to configure the following options:

  • Template Source: Select AWS Quick Start Templates.
  • Application Template: Choose the Hello World Example template.
  • Runtime and Package Type: Opt for the Python runtime and zip package type.
  • CloudWatch Application Insights: Similarly, opt out of monitoring with Amazon CloudWatch Application Insights.
  • Project Name: Name your application (e.g., “sam-app”).

The CLI will guide you through the process interactively. Make selections based on your preferences or accept the default values.

Step 2: Building the Application

Once the project is initialized, navigate to the project directory using the command line:

From within the project directory, execute the following command to build your application:

If you don’t have Python installed locally, you can use Docker for building by running:

This command compiles your application, prepares it for deployment, and generates the necessary artifacts.

Step 3: Deploying to AWS Cloud

To deploy your application to the AWS Cloud, ensure that your AWS credentials are configured properly on your local machine.

From the project directory, deploy your application using the following command:

Follow the guided prompts to configure your deployment settings, such as the AWS CloudFormation stack name and IAM role creation. Once configured, the AWS SAM CLI will upload your application to Amazon S3, transform the SAM template into CloudFormation, and provision the necessary resources.

You have now successfully initialized, built, and deployed your Hello World application using AWS SAM CLI. 



HELO WORLD APPLICATION THROUGH AWS

Step 1: Initializing the Sample Hello World Application

To get started, we’ll use the AWS SAM CLI for initializing a sample of Hello World application project (python) on your local machine. Follow these steps for making your application:

  1. Open your command line interface and navigate to a directory of your choice.
  2. Run the following command to initialize the sample Hello World application:
  3. The AWS SAM CLI will guide you through the initialization process. Configure the following options:
  • Select AWS Quick Start Templates.
  • Choose the Hello World Example template.
  • Opt for the Python runtime and zip package type.
  • Opt out of AWS X-Ray tracing and monitoring with Amazon CloudWatch Application Insights.
  • Name your application as desired (e.g., sam-app).
  1. Follow the interactive flow to complete the initialization.

By the end of this step, you’ll have a fully initialized Hello World application project on your local machine.

Step 2: Building Your Application

Once your project is initialized, it’s time to build your application using the AWS SAM CLI. Follow these steps:

  1. Navigate to your project directory in the command line interface.
  2. Run the following command to build your application:


  3. If you don’t have Python installed locally, use the sam build –use-container command instead.

Step 3: Deploying Your Application to the AWS Cloud

Now that your application is built, it’s ready for deployment to the AWS Cloud. Follow these steps:

  1. Ensure you have AWS credentials configured on your local machine. If not, refer to AWS CLI Configuration Guide.
  2. From your project directory, run the following command to deploy your application:
  1. Follow the interactive flow to configure your deployment settings, including the AWS CloudFormation stack name, AWS Region, IAM role creation, and other preferences.
  2. Once configured, the AWS SAM CLI will upload your application files to Amazon S3, transform your AWS SAM template into an AWS CloudFormation template, and provision your AWS resources.
  3. Monitor the deployment progress in the command line interface until completion.

Congratulations! Now, your Hello World application project is successfully deployed and running in the Amazon Web Service Cloud.

Conclusion

In this tutorial, we’ve demonstrated how to create a Hello World application using DevOps tools. By following these steps, you’ve gained hands-on experience in building and deploying serverless applications with ease. Start building your own applications today and unlock the power of DevOps on AWS.

Stay tuned for more tutorials and insights on AWS and DevOps practices.

Founder & Transformation Coach

Licenses & Certificates

  • DevOps Institute Ambassador
  • Scaled Agile Certified Program Consultant 
  • Jenkins Continuous Integration Open-Source Project
>