Accend Networks San Francisco Bay Area Full Service IT Consulting Company

Categories
Blogs

AWS Placement

AWS Placement Group Hands-On Demo

AWS Placement Groups are a useful tool for improving EC2 instance performance, especially when you need fast communication (low latency) or the ability to handle a lot of data (high throughput). They help you arrange your instances in a way that makes them work better and more reliably. In this demo, we’ll show you how to create and use a Placement Group step-by-step.

What is a Placement Group?

Optimizes low latency and high throughput for EC2 instances by grouping them in the same Availability Zone.

Types of Placement Groups

Cluster Placement Group: Packs instances close together inside an Availability Zone. This strategy enables workloads to achieve the low-latency network performance necessary for tightly coupled node-to-node communication that is typical of HPC applications.

Partition Placement Group: Spread your instances across logical partitions such that groups of the cases in one partition do not share the underlying hardware with groups of instances in different partitions. This strategy is typically used by large distributed and replicated workloads, such as Hadoop, Cassandra, and Kafka.

Spread Placement Group: Strictly places a small group of instances across distinct underlying hardware to reduce correlated failures.

A spread placement group is a group of instances that are each placed on distinct racks, with each rack having its own network and power source.

Why use Placement Group?

Placement groups help us to launch a bunch of EC2 instances close to each other.

This can work well for applications exchanging a lot of data and can provide high performance with collocation.

All nodes within the placement group can talk to all other nodes within the placement group at the full line rate of 10 Gbps single traffic flow without any slowing due to over-subscription.

Let’s dive into the hands-on lab.

Step 1: Sign in to AWS Management Console

Login to your AWS account from the AWS console, in the search bar, type EC2 then select EC2 Under services.

Step 2: Create EC2 Placement Groups as desired.

Navigate to the left side of EC2 then select placement group.

Click Create Placement Group

On the Create Placement Group dashboard, enter the name and select a placement strategy to determine how the instances are to be placed on the underlying hardware.

  1. a) For the Cluster placement group, in the placement strategy dropdown, select the cluster option.

b) For Spread Placement Group, in the placement strategy dropdown, select the option as spread and select Spread Level as either Host or Rack.

c) For Partition Placement Group, in the placement strategy dropdown, select the option as Partition and in the Number of Partitions dropdown select several partitions that you want to create in this placement group.

I settled on a Cluster placement Group, and my placement Group has been successfully created.

Step 3: Create EC2 instance and assign placement group to it.

We will now go ahead and launch an EC2 Instance and add the Instance to our placement Group.

Select instances in the EC2 dashboard then click Launch Instance, In the launch Instance dashboard, provide your Instance details.

Select your preferred OS and Machine Image.

Move with the free tier eligible Instance, then select your key pairs.

Leave networking as default, and select your security groups.

Leave storage as default, scroll down.

In the advanced section, expand and then scroll all the way down,

In the advanced section, expand and then scroll down, 

In the placement group section, select the placement group you have just created.

Since t2. Micro is not supported for the Cluster placement group; I will not click Launch.

That’s it, from this demo, I hope you now Know how to create a placement group.

Make sure to delete the placement group, as it is always a good practice to clean up resources.

Since t2. Micro is not supported for the Cluster placement group; I will not click Launch.

That’s it, from this demo, I hope you now Know how to create a placement group.

Make sure to delete the placement group, as it is always a good practice to clean up resources.

If you have any questions concerning this article or have an AWS project that requires our assistance, please reach out to us by leaving a comment below or email us at sales@accendnetworks.com.


Thank you!

Categories
Blogs

Mastering AWS Billing

Mastering AWS Billing: Simple Tips for Managing Costs

Amazon Web Services (AWS) provides many cloud services that help businesses grow and create new things quickly. But with so many options, it can be hard to manage costs. Understanding how AWS billing works is important to avoid surprise charges and make the best use of cloud resources. In this article, we explain AWS billing and give simple tips to help you keep your cloud costs under control.

AWS Billing Overview

AWS charges customers based on usage, meaning that costs can vary depending on the services consumed and the way resources are used. Here’s a breakdown of key concepts in AWS billing:

  1. Pay-As-You-Go Model

AWS operates on a pay-as-you-go model, meaning that you only pay for what you use. This provides flexibility but can also lead to unpredictable costs if not properly managed. Billing is typically based on:

   Compute: Charges for EC2 instances, Lambda executions, and other compute services.

   Storage: Costs for services like S3, EBS (Elastic Block Store), and Glacier.

   Data Transfer: Costs related to transferring data between AWS regions or out to the internet.

  1. Free Tier

AWS offers a Free Tier that allows new customers to explore AWS services without incurring costs. This includes limited usage for services like EC2, S3, and Lambda for 12 months, and certain services that remain free within usage limits.

  1. Reserved Instances (RI)

For predictable workloads, AWS offers Reserved Instances, which allow you to reserve capacity in advance for a reduced hourly rate. These provide significant savings (up to 72%) compared to on-demand pricing.

  1. Savings Plans

AWS Savings Plans are flexible pricing models that allow you to save on EC2, Lambda, and Fargate usage by committing to a consistent amount of usage (measured in dollars per hour) for a 1 or 3-year term. They offer similar savings to Reserved Instances but with more flexibility.

  1. AWS Pricing Calculator

The AWS Pricing Calculator is an invaluable tool for estimating the costs of AWS services before you commit. It allows you to model your architecture and get an estimated cost for the resources you intend to use.

To access the pricing calculator, on the left side of the Billing console select pricing calculator, you can also access this service even if you are not logged in to the management console, lets see how we can create an estimate, click on create an estimate.

Fill in your details for the estimate.

Select your operating system, number of instances, and workloads.

Select payment options,

Then you can save and view estimates.

Tips for Managing AWS Billing

To avoid unexpected charges and optimize your AWS costs, consider these key tips:

  1. Set Billing Alerts

AWS provides the ability to set up billing alerts, which can notify you when your usage exceeds a specified threshold. By configuring these alerts in the AWS Budgets service, you can track your spending in real time and take action before costs spiral out of control.

For example, if you are a new bae, you can set zero spending in the AWS budget, lets create a small budget for zero spend, this will ensure as we navigate the AWS free tier, the AWS budget does not exceed the free tier with any amount.

In your Billing dashboard, click on the AWS budget, then click on Create Budget.

In the choose budget type, select use a template, then select zero spend budget.

Give your budget a name, for example, my zero-spend budget. Provide the email address you will be notified with in case your budget exceeds zero, then scroll down and click Create a budget.

  1. Use Cost Explorer

AWS Cost Explorer allows you to visualize your spending patterns over time. It provides detailed reports on your usage, making it easier to identify which services are consuming the most resources and where potential savings can be made.

Filter by Service: Use filters to see which services are driving the majority of your costs.

Set Time Frames: Analyze costs over different periods (daily, monthly, or yearly).

Track Reserved Instances (RIs): Keep an eye on your RI usage to ensure you’re getting the most out of your investments.

Conclusion

By familiarizing yourself with key AWS billing concepts, taking advantage of available tools, and implementing best practices, you can avoid surprises on your AWS bill and ensure that your company’s cloud spending matches its goals.

Thanks for reading and stay tuned for more.

If you have any questions concerning this article or have an AWS project that requires our assistance, please reach out to us by leaving a comment below or email us at sales@accendnetworks.com.


Thank you!

Categories
Blogs

Setting Up a VPC Endpoint

Hands-on Demo: Setting Up a VPC Endpoint to Securely Access Amazon S3 bucket

Amazon Virtual Private Cloud (VPC) endpoints let you securely connect your VPC to AWS services, like S3, without using the public internet. This means you don’t need an internet gateway, NAT device, VPN, or Direct Connect to access these services. In this blog, I will walk you through how to set up a VPC endpoint to connect to Amazon S3 securely from within your VPC.

Why VPC Endpoint for S3

VPC Endpoint for S3 provides us a secure link to access resources stored on S3 without routing through the internet. AWS doesn’t charge anything for using this service.

In this hands-on lab, we will create a custom VPC with a public and private subnet, we will then Launch a private EC2 Instance in the private subnet and a public EC2 Instance in the public subnet. We will then create an S3 Gateway endpoint and test connection from the public and private EC2 Instances.

Step 1: Create VPC with public and private subnet

Log into the AWS Console and navigate to the VPC dashboard.

Click Create VPC

Fill in VPC details, select VPC only, then enter VPC CIDR under IPv4 CIDR, leave it at default tenancy then click Create VPC.

Select the created VPC, and click the actions drop-down button to go to VPC settings.

Under DNS settings, check the box on Enable DNS hostnames then click save.

Step 2: Create Internet Gateway and attach it to VPC

Select Internet Gateway on the left side of VPC UI, then click Create Internet Gateway.

Fill in the details then click Create Internet Gateway.

Click the attach button, select the VPC to attach the internet gateway then select attach internet gateway.

Step 3 create subnets

Select subnets in the Left side UI of the VPC dashboard then click Create Subnet.

Select the VPC you just created then scroll down.

Fill in subnet details, enter your preferred name then for subnet CIDR, enter 10.0.0.0/24, scroll down, and click Create subnet.

For the public subnet click the Action drop-down button, then navigate to subnet settings then select it. Tick the box enable-auto-assign public IP. Then click save.

Again, click Create subnet, and repeat the above process, but now for IPv4 CIDR enter 10.0.1.0/24, scroll down, and click Create subnet.

Two subnets were created as you can view them.

Create a Public route table, add a public route to the Internet, and associate the public route with the public subnet.

Under route tables, click Create route table.

Call it public Route table, select your VPC, then click Create route table.

Select the created route table navigate to the routes tab, click edit routes then add route.

Add the pubic route, 0.0.0.0/24, and destination select the internet gateway of the VPC you created then click save changes.

Navigate to the subnet association tab then click Edit associations.

Select the public route table then click Save Associations. The private subnet will be Implicitly associated with the main route table which routes traffic locally within the VPC, hence it’s private by default.

Step 4 create Gateway endpoint

On the left side of VPC UI, select endpoints then click Create Endpoint.

The service category is AWS service.

Under services search Gateway then select it. Under the service name select s3 as shown below. For VPC, select your VPC

Select all the route tables.

We will not create a custom policy, move with full access, scroll down, and click create endpoint.

Step 5: Create bucket and upload objects

In the console search bar, look for S3, then select it.

Click Create bucket.

Leave it at general purpose then fill in Bucket name. Block all public access, scroll down, and click Create bucket.

Upload objects to your bucket by Clicking the upload button,  

Step 6: Luanch two EC2 Instances, in the private and public subnet

We will begin by launching the private Instance. Navigate to the EC2 console and click Launch Instances.

Fill in the Instances details, then for OS select Amazon Linux since it comes with AWS CLI pre-installed.

Select t2. Micro instance

Select your key pairs.

Expand the networking tab, and under VPC select the VPC you just created. Then for subnet select your private subnet.

These are the only settings we need, review under the summary and click Launch Instance.

Repeat the same process for the Instance in the public subnet, the only difference is you will select the public subnet under the Networking tab.

Once the two virtual machines are up and running, connect to your instance in the public subnet.

Once in the instance, run the aws configure command, fill in your details.

Once in the instance, run the aws configure command, and fill in your details.

aws s3 ls s3://<bucket-name>

running this command, we can see we can access the contents from our public Instance through the internet.

Let’s do the same for our Instance in the private with no internet access. Log in to your instance in the private subnet, you can use the EC2 Instance connect endpoint. Run the aws configure to configure your credentials.

Fill in your key details.

Try listing bucket contents, we can see we are accessing our bucket contents, remember we are now not using the public internet but accessing our bucket securely through our Gateway endpoint. That’s it.

Clean up.

Thanks for reading and stay tuned for more.

If you have any questions concerning this article or have an AWS project that requires our assistance, please reach out to us by leaving a comment below or email us at sales@accendnetworks.com.


Thank you!

Categories
Blogs

Using an Alias for Your AWS Account ID

Using an Alias for Your AWS Account ID

AWS (Amazon Web Services) account IDs are unique identifiers that serve as key elements when managing resources, executing services, or configuring security measures. But remembering a 12-digit number can be tough. As a result, AWS allows users to create nicknames (aliases) for their account ID, offering an easier way to reference an account. This guide explores the benefits and steps for setting up an alias for your AWS account ID.

Why Use an Alias for Your AWS Account ID?

Readability and Memorability: A 12-digit number can be hard to recall. An alias, on the other hand, is a user-friendly label that can be descriptive and easy to recognize.

Enhanced Collaboration: If you’re working in a team, sharing an alias (like “development-team-account” or “finance-dept”) makes it easier for others to understand whose account it is.

Organizational Clarity: In a large-scale AWS environment with multiple accounts under an organization, using aliases can simplify identifying accounts, especially in multi-account setups.

Security by Hiding Details: While the account ID is not sensitive by itself, using an alias may help obscure the raw ID when sharing AWS resources or working with third-party tools. Where AWS Account Aliases Are Useful

AWS account aliases are primarily used in these scenarios:

IAM Sign-in URLs: The default sign-in URL for IAM users is based on the AWS account ID. By creating an alias, you can replace the numeric ID with the alias for easier access

Setting Up an AWS Account Alias

Log into your AWS Management Console as an I am user with admin privileges or you must have the following, I am roles assigned to you.

  • iam:ListAccountAliases
  • iam: CreateAccountAlias

As we can see when you sign in as an I Am user, you must provide your AWS account ID which can be a daunting task to remember. This is where the account alias comes in handy.

Once logged in to your AWS account, type I AM in the search bar then select I AM under services.

In the I AM console on the left side of the navigation pane, select dashboard.

Scroll down to the AWS account section, where you will find the account Alias, then click Create.

Fill in your account alias keeping in mind it must always be unique then click Create.

Successfully created the account alias, and as can be seen, our sign-in URL is now using our account alias, copy the URL to your clipboard then open a new browser and paste it in there.

As can now be seen, in the account ID section is our account alias, fill in your required details.

We have successfully logged in to our AWS account using the account alias and if you check at the top-hand right corner, we can see our AWS account ID is not being displayed but our account alias.

Security Considerations

While using an alias for your AWS account ID is beneficial, keep in mind:

Not a Security Measure: An alias doesn’t provide additional security. It’s purely for convenience. Always ensure that your account is secured using strong IAM policies, MFA (Multi-Factor Authentication), and least-privileged access.

Unique Across AWS: Aliases are globally unique, which could result in name conflicts if your preferred alias is already in use.

Best Practices for AWS Account Aliases

Choose a Descriptive Alias: Your alias should make sense within your organization. Use department names, environments (e.g., development, production), or geographical regions to make the account easily identifiable.

Keep Aliases Short: Longer aliases can make the IAM URL cumbersome. A good balance is a short but meaningful name.

Conclusion

With just a few clicks, you can set an easily recognizable alias that replaces the default 12-digit numeric account ID in several key places.

That’s it, thanks for reading, and stay tuned for more.

If you have any questions concerning this article or have an AWS project that requires our assistance, please reach out to us by leaving a comment below or email us at sales@accendnetworks.com.


Thank you!

Categories
Blogs

Understanding AWS Placement Groups

Understanding AWS Placement Groups: Maximizing Performance and Reliability in EC2 Deployments

AWS Placement Groups are a handy capability of Amazon Web Services (AWS) which allows users to enhance network optimization and fault tolerance of their EC2 instances. If you are running performance-intensive applications or controlling large distributed operating system domains, placement groups let you leverage how the EC2 instances are spread through the AWS deployment, allowing a better focus on networking, latency, and faults recovery.

What is a Placement Group?

A placement group is a way to control how your EC2 instances are placed on the underlying hardware in the AWS cloud. By influencing the physical location and network proximity of your instances,

All nodes within the placement group can talk to all other nodes within the placement group at a full line rate of 10 Gbps single traffic flow within the enclosure without any over-subscription-related delay.

Best Use Cases:

High-performance computing (HPC): Applications that require low latency, such as real-time data analytics or financial services.

Distributed machine learning: applications that need fast, low-latency communication between instances.

Benefits:

Low latency: The physical proximity of instances ensures minimal delay in communication.

High throughput: Instances can utilize high bandwidth for inter-instance data transfer.

Types of Placement Groups?

Cluster Placement Group

Packs instances close together inside an Availability Zone. This strategy enables workloads to achieve the low-latency network performance necessary for tightly coupled node-to-node communication that is typical of HPC applications.

A cluster placement group is a logical grouping of instances within a single Availability Zone. A cluster placement group can span peered VPCs in the same region. Instances in the same cluster placement group enjoy a higher per-flow throughput limit of up to 10 Gbps for TCP/IP traffic and are placed in the same high-bisection bandwidth segment of the network.

Cluster Placement Groups are great for applications that require low latency or high throughput. They work best when most of the network traffic occurs between the instances in the group, making them ideal for workloads that depend on quick data exchange. If your application falls into this category, using a Cluster Placement Group can help improve performance significantly!

Partition Placement Group

Spread your instances across logical partitions such that groups of the cases in one partition do not share the underlying hardware with groups of instances in different partitions. This strategy is typically used by large distributed and replicated workloads, such as Hadoop, Cassandra, and Kafka.

Partition placement groups help reduce the likelihood of correlated hardware failures for your application. When partition placement groups are used, Amazon EC2 divides each group into logical segments called partitions.

Amazon EC2 ensures that each partition within a placement group has its own racks. Each rack has its own network and power source. No two partitions within a placement group share the same racks, allowing you to isolate the impact of a hardware failure within your application.

Each partition comprises multiple instances. The instances in a partition do not share racks with the instances in the other partitions, allowing you to contain the impact of a single hardware failure to only the associated partition.

Partition placement groups can be used to deploy large distributed and replicated workloads, such as HDFS, HBase, and Cassandra, across distinct racks.

Spread Placement Group

Strictly places a small group of instances across distinct underlying hardware to reduce correlated failures.

A spread placement group is a group of instances that are each placed on distinct racks, with each rack having its own network and power source.

Spread placement groups are recommended for applications that have a small number of critical instances that should be kept separate from each other. Launching instances in a spread placement group reduces the risk of simultaneous failures that might occur when instances share the same racks.

Placement Group Rules and Limitations

General Rules and Limitations

  • The name that you specify for a placement group must be unique within your AWS account for the Region.
  • An instance can be launched in one placement group at a time; it cannot span multiple placement groups.
  • You can’t merge placement groups.
  • Instances with a tenancy of a host cannot be launched in placement groups.
  • On-demand capacity Reservation and zonal Reserved Instances provide a capacity reservation for EC2 instances in a specific Availability Zone. The capacity reservation can be used by instances in a placement group. However, it is not possible to explicitly reserve capacity for a placement group.

Conclusion

AWS Placement Groups are a useful way to make your EC2 performance better, depending on what your application needs for networking and availability. By picking the right type of placement group, you can find the best mix of performance, cost, and reliability for your tasks.

Thanks for reading and stay tuned for more.

If you have any questions concerning this article or have an AWS project that requires our assistance, please reach out to us by leaving a comment below or email us at sales@accendnetworks.com.


Thank you!