Tag: AWS

  • TekStream Achieves AWS Partner Government Services Competency  

    TekStream Achieves AWS Partner Government Services Competency  

    Designation Recognizes TekStream Expertise in Unique Needs of Government Migration Projects and Maximizing AWS Funding Programs to Offset Client Migration Expenses

    Atlanta, Georgia, July 24, 2023 – TekStream Solutions, LLC is pleased to announce its selection by Amazon Web Services (AWS) as an Advanced Technology Partner in the AWS Government Competency Program. This designation recognizes TekStream’s proven ability to help Government agencies migrate, modernize, and optimize their workloads on AWS.  

    As an AWS Government Services Competency Partner, TekStream is authorized to provide the full range of migration services, including assessment, planning, design, implementation, operation and optimization. Migration is a critical part of cloud adoption, and TekStream has the experience and expertise to ensure state, local and federal agencies successfully transition critical workloads to AWS.  

    “We are excited to be named an AWS Government Services Competency Partner,” says Troy Allen, Vice President, Cloud Services at TekStream. “This designation reflects our extensive technical experience migrating government workloads to the cloud and modernizing their applications. It is a rigorous selection process, and we are proud TekStream was recognized by AWS as being well equipped to provide our customers an enhanced level of service.”    

    “The AWS Government Services Competency Partner designation gives our teams access to exclusive AWS resources and incentives as well as unique partner programs,” says Judd Robins, EVP, Sales & Marketing at TekStream. “This combined with our experience and understanding of AWS toolsets uniquely positions our teams to create and implement cloud migration and transformation plans across a variety of industries and use cases.” 

    One of TekStream’s recent government customers to receive AWS funding was the Georgia Technology Authority (GTA). TekStream helped them migrate their on-premise datacenter to the AWS Cloud, improving resiliency and stability. GTA realized $1M annual savings by moving workloads to the cloud and leveraged $150k in AWS incentives to fund their migration. Access to AWS funding allowed them to launch the program without cost, avoiding the long budgeting process some government agencies face. 

    As an AWS Partner with awarded designations including Migration Services Competency, Oracle Migration Competency and now the Government Services Competency TekStream has unique access to special funding programs that subsidize costs to migrate to the cloud. TekStream experts have the know-how and training to take maximum advantage of these special funding sources as they help clients anticipate, plan, and activate cloud migration initiatives. For more information on these programs, visit www.tekstream.com/aws funding.   

    About TekStream:  

    TekStream, (www.tekstream.com) headquartered in Atlanta, Georgia, helps clients accelerate digital transformation by navigating complex technology environments with a combination of technical expertise and staffing solutions. TekStream provides battle-tested processes and methodologies to help companies with legacy systems get to the cloud faster, so they can become more agile, reduce costs and improve operational efficiencies. With hundreds of successful deployments, TekStream guarantees on-time and on-budget project delivery and is proud to have 98% customer retention. 

  • Creating Splunk Cloud Architecture Diagrams Using Lucidchart

    Creating Splunk Cloud Architecture Diagrams Using Lucidchart

    By Kamal Dorairaj, Senior Splunk Consultant

    Knowledge is valuable, and in the case of the Splunk installation at your firm a visual representation of the platform configuration becomes a key asset. The diagram gives better understanding of the Splunk Cloud Implementation and is useful for internal training as well as documentation needs at your company. In this blog, we will offer a step by step process for creating a Splunk cloud architecture diagram using Lucidchart.

    The architecture diagram is best created in Lucidchart, which has all Splunk shapes, icons and images. It also has a library of shapes for all of the leading products you may be using, like AWS, Google Cloud Platform (GCP), Azure and other security products. You can also import shapes from external sources and use it for the diagram. Lucidchart provides options to export the diagram in various formats including pdf, Visio, jpeg, png and csv.

    Discovery

    In the discovery phase you will gather all the information required for the architecture diagram. Ask yourself these questions to ensure you include the essential materials:

    • Which Splunk systems are being used in the environment? Examples include UF, HF, DS, etc.
    • Where do the UFs forward to? Heavy Forwarders, Indexers, or a mix?
    • What kind of data collection is taking place? Ex: Syslog, HEC, API.
    • What is the list of data sources per HF? This will include the vendor/product lists.
    • Which host has what type of Apps/Data collection?
    • What are the IP, host name, cpu/memory/disk spaces of each HF/UF/DS?
    • Are you using Splunk Premium Products in addition to Splunk Enterprise? These might include enterprise security, UBA or ITSI.

    Diagram Creation Process

    The diagram should be closely associated to the Splunk Validated Architecture based on the environment.

    Architecture Layers
    Login: Users access Splunk Cloud Search Head through ‘https 443’ via the internet.

    Splunk Cloud Search Head Tier and Indexing Tier: The Search Head on the cloud got an Adhoc SH (customer.splunkcloud.com) and SH for the premium product if there is one. Ex: ES SH (escustomer.splunkcloud.com). The SH on the Cloud talks to the Indexing Cluster Tier through port 8089. Splunk does not allow to put any indexers or search head host details in the diagram.

    Getting Data thru HEC and API: Apps or data that send through HEC (http event collector) token-based to Splunk Cloud Platform is a fast and efficient way. The HEC data flows to Splunk Cloud through port ‘https 443’. Getting Data in through APIs to Splunk Indexing layer by configuring the API inputs through an authentication type.

    On-Prem Collection Tier: This part of the architecture lives on the customer network side. We have Heavy Forwarder and Universal Forwarder. The instances could be on unix or windows. Both the HFs and UFs forward the data to the Splunk Indexing tier thru port ‘TCP 9997”.

    On-Prem Management Tier: The DS has all the apps and config files which pushes the changes thru ‘TCP 8089” to the HFs and UFs. Many times, the license master is installed in the same DS server instances.

    Syslog Sources: There could be single or multiple syslog sources that send data thru ‘TCP UDP 514’ in a network load balancer to the UFs or HFs. The syslog can also configure to flows thru SC4S.

    PORT Details:
    TCP 8089 -> Splunk Management Port
    TCP 9997 -> Splunk Data
    HTTPS 443 -> Splunk Web
    TCP UDP 514 -> Syslog
    TCP 8191 -> KV Store Replication
    TCP 9777 -> SHC Replication
    TCP 9887 -> IDX Replication

    This is what a typical Splunk cloud architecture diagram will look like:

    Detailed architecture diagram of a Splunk Cloud deployment created in Lucidchart. The image shows multiple tiers: users connecting via HTTPS, the Splunk Cloud search tier, indexing tier, and on-premises tiers for collection and management. Data flow is represented with color-coded lines for different protocols, such as TCP 9997 for data and HTTPS 443 for web. Components include forwarders, heavy forwarders, syslog sources, SC4S, deployment servers, and AWS CloudTrail.

    Have fun creating diagrams of your own. As always, we are here if you have any questions. Contact us here:

  • Migrating On-Premises Oracle Exadata Databases to Amazon RDS

    Migrating On-Premises Oracle Exadata Databases to Amazon RDS

    Oracle Exadata is a popular on-premises database solution that offers high performance, reliability, and security. However, as businesses increasingly move towards cloud-based solutions, there is a growing need to migrate on-premises Oracle Exadata instances to the cloud as running Oracle Databases on these oversubscribed Exadata Database Machines impacts business ability to gain agility and reduce cost. Amazon RDS for Oracle is a fully managed commercial database that makes it easy to set up, operate, and scale Oracle deployments in the cloud. Additionally, AWS provides the option to modernize your Oracle database workloads running on Exadata to cloud native databases like Amazon Aurora, Redshift, DynamoDB, etc. In this blog, we will discuss how to migrate on-premises Oracle Exadata instances to Amazon RDS, including the options available, licensing considerations and how DBCSI can be used to right-size the environment.

    Benefits of Migrating Oracle Exadata Workloads to AWS

    Oracle Exadata is a high-performance database machine that provides a range of features and capabilities for running Oracle databases, while Amazon RDS is a fully managed database service that provides a range of options for running relational databases in the cloud. Here is a comparison of the features of Oracle Exadata and Amazon RDS.

    Performance

    Oracle Exadata provides high-performance computing and storage capabilities through its unique hardware and software architecture, including hardware-accelerated SQL processing and optimized data storage.

    Amazon RDS provides a range of instance types optimized for different workloads, including compute-optimized, memory-optimized, and storage-optimized instances. Both Oracle Exadata and Amazon RDS provide high performance for database workloads, but the specific performance characteristics may vary depending on the workload and configuration.

    Scalability

    Oracle Exadata provides linear scalability for both compute and storage, which allows businesses to easily scale up or down their database resources based on their workload demands.

    Amazon RDS provides a range of scalability options, including the ability to scale compute and storage independently, and the ability to easily resize instances.

    Availability

    Oracle Exadata provides high availability through its redundant hardware and software architecture, including redundant networking, power, and cooling, and automatic failover.

    Amazon RDS provides high availability through its multi-AZ deployment option, which replicates data to a standby database in a different availability zone to provide automatic failover in case of an outage.

    Security

    Oracle Exadata provides a range of security features, including encryption, auditing, and access controls, and is compliant with a range of industry regulations and standards.

    Amazon RDS provides a range of security features, including encryption at rest and in transit, automated backups, and automatic software patching, and is also compliant with a range of industry regulations and standards.

    Management

    Oracle Exadata provides a range of management tools, including the Oracle Enterprise Manager, which provides centralized management and monitoring for databases, servers, and storage.

    Amazon RDS provides a range of management tools, including the AWS Management Console, AWS CLI (Command Line Interface), and AWS SDKs, which provide automated provisioning, backups, monitoring, and patching. Additionally, Amazon RDS being a fully managed database service helps reduce the time and effort spent on standard database administration tasks.

    Options for Migrating Oracle Exadata to Amazon RDS

    There are several options available for migrating Oracle Exadata to Amazon RDS, including:

    Database Migration Service (DMS)

    AWS Database Migration Service (DMS) is a fully managed service that helps migrate databases to AWS quickly and securely. DMS supports both homogeneous and heterogeneous database migrations and can be used to migrate on-premises Oracle databases to Amazon RDS.

    Export/Import

    Export/Import is an Oracle tool that can be used to migrate data from on-premises Oracle databases to Amazon RDS. Export/Import creates a binary file that contains the database schema and data, which can be imported into Amazon RDS.

    GoldenGate

    GoldenGate is an Oracle tool that can be used to replicate data in real-time from on-premises Oracle databases to Amazon RDS. GoldenGate can be used to minimize the downtime during migration and can also be used for ongoing replication.

    Migration Approach

    Assessment and Planning

    The first step in any migration process is assessing your current environment and establishing a clear plan. Consider factors like database size, schema and object dependencies, and network infrastructure. Identify critical applications and create a comprehensive migration plan, including milestones and timelines.

    Selecting the Right Amazon RDS Instance

    Select the appropriate Amazon RDS instance for your needs based on factors such as storage capacity, memory, and network performance. Consider using Amazon’s Database Migration Service (DMS) to simplify the migration process, especially if you have large volumes of data or complex schemas.

    DBCSI for Right Sizing the Environment

    Database Current State Investigation (DBCSI) is a robust tool that can be used to right-size the environment for Amazon RDS. DBCSI provides recommendations for the optimal configuration of the database based on the workload, which can help optimize performance and reduce costs. It analyzes database workloads and provides recommendations for optimizing database performance and reducing costs. The tool also analyzes database usage patterns, performance metrics, and configuration settings to identify areas where database resources can be optimized.

    Some of the key features of DBCSI include:

    • Workload Analysis: DBCSI analyzes database workloads to identify usage patterns, performance metrics, and configuration settings. This helps customers understand how their databases are being used and where resources can be optimized.
    • Resource Recommendations: DBCSI provides recommendations for optimizing database performance and reducing costs by right-sizing database resources. This includes recommendations for instance type, storage size, and database configuration settings.
    • Cost Savings Analysis: DBCSI provides an analysis of cost savings that can be achieved by implementing the recommended changes. This helps customers understand the potential cost savings and return on investment of optimizing their database resources.
    • Customization: DBCSI allows customers to customize the analysis and recommendations to their specific needs and requirements. This includes the ability to exclude certain databases or instances from the analysis, and to adjust the analysis based on specific business requirements.
    Schema and Application Conversion

    For complex schemas, use the AWS Schema Conversion Tool (SCT) to convert your Oracle Exadata schema to the Amazon RDS schema. Adjust application code, SQL queries, and database links to ensure compatibility with Amazon RDS.

    Licensing Considerations

    Before migrating on-premises Oracle Exadata instances to Amazon RDS, it is important to consider licensing requirements. Oracle databases require a license to run, and Amazon RDS provides two options for licensing:

    • Bring Your Own License (BYOL): With BYOL, customers can use their existing Oracle licenses to run their databases on Amazon RDS. Customers are responsible for managing their own licenses and ensuring compliance with Oracle’s licensing policies.
    • License Included: With License Included, AWS provides the necessary licenses to run Oracle databases on Amazon RDS. Customers pay an hourly rate for the database’s use, which includes the cost of the license.

    Oracle License Optimization Assessment (OLA)

    When migrating Oracle Exadata instances to Amazon RDS, licensing considerations are a key factor to keep in mind. To comply with Oracle licensing agreements and optimize licensing costs for their databases running on Amazon RDS, businesses can use the Oracle License Optimization Assessment (OLA) process. OLA assesses the licensing requirements for Oracle databases running on AWS, and provides recommendations for cost optimization. By leveraging OLA during the migration process, businesses can ensure compliance with licensing agreements and optimize licensing costs for their databases running on Amazon RDS.

    More information on OLA and how TekStream can assess your Oracle environment for FREE can be found on this datasheet.

    Alternatives to Amazon RDS

    AWS provides the following additional options that customers may consider as a candidate for moving their on-prem Oracle Exadata workloads.

    Oracle on EC2

    Oracle on EC2 provides businesses with the flexibility to run Oracle databases on Amazon EC2 instances. With Oracle on EC2, businesses have full control over the infrastructure and can customize the operating system, install custom software, and use specialized hardware.

    Pros
    • Greater control over the infrastructure
    • Ability to customize the operating system and software
    • Flexibility to use specialized hardware

    Cons
    • Requires additional expertise and resources to manage the infrastructure
    • Higher management and maintenance costs compared to managed database services
    • Limited automation for database management tasks

    Amazon RDS Custom for Oracle

    AWS announced the availability of Amazon RDS Custom for Oracle, which allows customers to run Oracle databases in Amazon RDS with custom configurations. With this new offering, users can install and manage their own Oracle software, providing greater flexibility and control over their database environment. RDS Custom for Oracle supports Bring Your Own License (BYOL) and makes it easy to lift and shift existing Oracle workloads to the cloud, while also benefiting from the managed database service capabilities of Amazon RDS, such as automated backups, monitoring, and scaling.

    Amazon Redshift

    Amazon Redshift is a fully managed, petabyte-scale data warehouse service designed for high-performance analytics and large-scale data processing. It is an excellent alternative to Amazon RDS when the primary focus is on analyzing large datasets and optimizing query performance.

    Amazon DynamoDB

    Amazon DynamoDB is a fully managed, highly available, and scalable NoSQL database service that provides low-latency performance for both small and large workloads. If the application requires a non-relational database that can handle high write and read throughput with ease, DynamoDB might be a better fit than Amazon RDS.

    Migrating on-premises Oracle Exadata instances to Amazon RDS can be a complex process that requires careful planning and execution. Businesses must carefully consider their migration options, licensing requirements, and technical details to ensure a successful migration. By taking advantage of Amazon RDS’s scalability, cost savings, security, and availability features, businesses can benefit from a fully managed database solution that can help them achieve their business objectives.

    More information on OLA and how TekStream can assess your Oracle environment for FREE can be found on this datasheet. You can also contact a TekStream expert right away using the request below.

  • Cloud Migration: How Three Companies Leveraged AWS Incentives to Accelerate Their Move

    Cloud Migration: How Three Companies Leveraged AWS Incentives to Accelerate Their Move

    By Judd Robins, Executive Vice President, Sales

    Amazon Web Services (AWS) is one of the clear leaders in cloud computing – offering an impressive array of services that allow organizations to shift their operations to the cloud. However, it may surprise you to learn that many organizations are receiving funding support from AWS to cover a portion, and sometimes all, of the expenses related to strategically migrating workloads to the AWS environment.  

    If you are considering a move to the cloud, we have three examples of TekStream clients that have leveraged AWS funds to support their cloud migrations.

    Navigating AWS Funding Opportunities

    Before we dive into these practical examples, let’s review the specific guardrails of the program. With AWS Funding, eligible projects can receive funds or credits from AWS to cover a portion of their project costs.

    The exact amount received from the AWS Funding Program depends on several factors, including the projected annual recurring revenue for the first 12 months of a project’s completion and the total cost of the project’s consulting services.

    Currently, AWS Funding can be accessed to support the following projects:

    • ISV Workload Migration Programs for Oracle, Splunk, Microsoft and others
    • Migration Acceleration Programs
    • Proof-of-Concept Initiatives

    Georgia Department of Human Services Migrated Document Imaging to The Cloud

    The Georgia Department of Human Services’ legacy Document Imaging System was showing signs of performance and security issues due to outdated software and aging hardware. After an in-depth discovery, TekStream developed a strategy for rehosting their documents on AWS’ Managed Service platform.

    A limited budget for the project made securing AWS funding critical to the successful completion of this project. As an AWS Certified Migration Competency Partner, TekStream successfully secured $250,000 in AWS funding to help cover migration and implementation costs.

    A subsidiary of a fast-growing quick service restaurant, Partnered with TekStream to Implement a Disaster Recovery Plan

    A subsidiary is a critical vendor to a fast-growing restaurant’s supply chain. The subsidiary company partnered with TekStream to develop and implement a disaster recovery plan to mitigate the risk and impact of any natural disaster or cyberattack that could impact its ability to meet its supply commitment.

    TekStream utilized AWS Elastic Disaster Recovery Services (DRS) block-level replication to create a cloud-based system to back-up critical data without impacting system performance. This system runs continuously in the background of the subsidiary company’s operations. The data is then replicated in a low-cost staging area, ensuring the subsidiary company can recover critical data and systems within 72 hours of a disaster or attack. To help support the development of this plan, TekStream worked with AWS Proof-of-Concept Funding to secure a commitment of 15% of the initiative’s cost.

    SGK Leveraged AWS To Automate Document Processing

    SGK is a global leader in brand marketing and packaging production. Every day, SGK professionals would sort through thousands of packaging proofs across 20+ languages to support the production needs of their 1,500 worldwide clients. The legacy process relied on extensive manual labor that was time-intensive, prone to error, and costly.

    TekStream AWS experts defined a new approach leveraging a suite of AWS tools to create an Intelligent Document Processing (IDP) solution that automated the extraction, translation, and cataloging of critical packaging information. The results included a 50% reduction in manual labor costs. Even better, TekStream was able to secure $25,000 in AWS funding to support the strategic implementation of this new IDP solution.

    AWS Funding May Be Available for Your Next Project

    We’ve found that one of the main reasons companies aren’t tapping into AWS funding is because they are unaware the funds are available, or they aren’t sure what projects will qualify to receive these funds. This is where a Certified AWS Migration Services Competency Partner like TekStream can help you navigate the options and gain maximum funding. If you are considering making a move to the cloud, we will show you how.

    Contact us to learn more about how TekStream’s AWS competencies and to schedule an introductory call with a TekStream AWS professional.

  • Tuning Your AWS WAF Configuration in Terraform

    Tuning Your AWS WAF Configuration in Terraform

    How to Implement Bot Control, Scope-down Statements, Allow US-only traffic, and/or Whitelist Exceptions to Rules Based on Whitelisted IPs or Header Information

    By: Brandon Prasnicki | Senior Cloud Architect

    AWS WAF is a Web Application Firewall that helps protect your web applications or APIs against common web exploits and bots that may affect availability, compromise security, or consume excessive resources. In this article, I describe and show the AWS WAF configuration in Terraform for a few use cases that may come in handy for your implementation.

    The first is bot control. Reducing bot traffic is rather simple when using WAF in AWS.  There is a managed rule you can use and documentation on how to create exceptions to allow certain traffic. Sometimes implementing the rules with Terraform can be a little tricky; this article contains an example use case you can use to help with your implementation.

    Amazon AWS describes this feature here and has documentation about the AWSManagedRulesBotControlRuleSet WAF rule here.

    Here are the steps on how the solutions were implemented.

    First, adding the rule was as straightforward as any other managed rule addition following the link below (The terraform is also included at the bottom of this article)

    With this enabled, we can quickly see bot traffic being rejected by navigating to:

    AWS WAF Bot Control diagram.

    And also:

    AWS WAF overview.

    And scrolling to the bottom of sampled requests and selecting the ManagedRulesBotControl block metric:

    AWS WAF ManagedRulesBotControl screenshot.

    Some of these blocks are false positives and may require whitelisting. For this, I have an IP set that I am using for known hosts and clients.

    Known hosts and clients IP screenshot.
    AWS WAF IP sets.

    I added the IPs to the IP set and used this IP set to whitelist rule for known hosts:

    IPs added to the IP set and used this IP set to whitelist rule.

    This whitelist IP set list was also used to whitelist IPs of non-US users to bypass the ‘Non US’ Geo Code Match Statement (DisallowNonUSTraffic seen in the Terraform below).

    However, not all requests were coming from known server hosts. Some requests were coming from client machines’ Tableau Desktop applications where the IPs were not static or always known. For this, I created a scope-down statement to grab the header information and allow anything that starts with ‘Tableau Desktop’ for the user-agent.

    Here is a screenshot of what this looks like in the console following this breadcrumb:

    AWS WAF - Web ACLs - ManagedWAFv2 - AWSManagedRulesBotControlRuleSet.

    Then you can click edit in this rule set to add a ‘Not Scope-down statement’ that will appear like this:

    NOT Scope-down statement.

    On the left you can see the blocked request with header information alongside the rule:

    Blocked request with Header info.

    Here is the Terraform for the IP set for whitelisting:

    Terraform for the IP set for whitelisting.

    Below is the entire Terraform for the web ACL.

    Here you will see:

    1. The implementation of the out-of-the-box AWSManagedRulesKnownBadInputsRuleSet_rule, AWSManagedRulesAmazonIpReputationList and AWSManagedRulesWindowsRuleSet.
    2. The exception rule to allow any whitelisted IPs.
    3. Disallowing any non-US traffic (not already included in whitelisted IPs).
    4. The web ACL with the whitelisted IP set referenced along with the scope-down statement in the AWSManagedRulesBotControlRuleSet.
    5. The scope-down statement to allow the Tableau Desktop communication.
    Terraform code defining an AWS WAFv2 Web ACL with two managed rule groups: KnownBadInputsRuleSet and AmazonIpReputationList, including CloudWatch metric configuration and override actions.
    Continuation of Terraform WAF rules including WindowsRuleSet, a whitelist IP set rule, and a geo-blocking rule for non-US traffic, each with visibility configuration and action settings.
    Terraform code configuring a bot control rule using AWSManagedRulesBotControlRuleSet with an exception for requests from Tableau Desktop identified by user-agent, including nested scope-down statements and visibility configuration.

    (Click here to download PDF of the code)

    These are just a few examples that can help manage your AWS WAF configuration in Terraform. The analysis of what rules to use and how to use match statements and scope-down statements might be the hardest part.

    TekStream can advise and help you implement these features and of course, assist with your implementation project or even support you in a ‘Consulting as a Service’ manner. Reach out today to see how we can help!

  • Automate Data Gathering and Evaluation with AWS

    Automate Data Gathering and Evaluation with AWS

    Jay Almers | Senior Cloud Solutions Architect

     

    Whether you are creating usage and billing reports or taking inventory of your AWS account(s) in preparation for an application or service migration, data gathering and evaluation are imperative to making actionable, informed decisions. AWS provides some very powerful tools in their management console to assist their users in capturing the information necessary to make these kinds of decisions; however, searching for and obtaining data from multiple tools and services and combining them into an aggregate report can often be a tedious task.

    To make things more difficult, let’s complicate that process by capturing this same information from multiple accounts. Depending on the volume of data, the number of sources, and the complexity of manipulation you need to perform, the amount of effort needed for data gathering and evaluation of this information could be quite significant. To make things even more difficult, what happens to the data (and the resulting reports) if a number was off by one decimal place unknowingly introduced due to human error?

     

    “Anything you have to do more than twice has to be automated.”

    -Adam Stone, CEO of D-Tools

     

    Automation is used in countless industries, from automotive manufacturing to zoological research, to perform repetitive tasks and decrease the possibility of error due to human intervention. The world of Information Technology is no different. Using the data inaccuracy scenario described above, it is clear to see that the process of collecting large amounts of data from multiple sources in a single account would benefit from automation, if for no other reason than to decrease the amount of time required to generate reports. In a multi-account situation, the time savings are even greater.

    Another benefit of automation is its inherent ability to decrease the chances of introducing errors due to human intervention. That’s all well and good, but you may be wondering how we can automate the process of collecting this data from AWS without utilizing the management console and ultimately making your life easier. Enter the AWS Command Line Interface (CLI), an amazing tool that can be used for everything from service provisioning to data collection. With a little bit of programming and knowledge of how the AWS CLI works, we can automate the process of collecting information from multiple sources and data points in an efficient and repeatable manner without the need for tedious and error-prone human intervention.

    Screenshot of an AWS CLI command output displaying VPC details in JSON format.

    To provide a real-world illustration of how this type of automation can be used, I’ll provide some details from a recent engagement TekStream was a part of. Our client, a large organization with many different internal departments, wanted to migrate a large number of non-enterprise AWS accounts into their controlled Enterprise Master Account. In order to migrate these accounts into the correct organizational structure with the necessary services, controls, and policies applied, they needed to determine the service and application requirements as well as gain an understanding of other operational considerations such as dependencies, availability, security, and fault tolerance.

    Capturing this amount of information would have taken a tremendous amount of time if done manually; time that could be better spent on other areas of business. We developed a series of scripts and utilities which utilized the AWS CLI and a few supporting libraries for data parsing and manipulation. The scripts collected this invaluable information and created aggregate reports that simplified the process of comparing accounts and assisted the client in making actionable, data-driven decisions in preparation for migration.

    Two of the main benefits of programmatic data collection, aggregation, and parsing is using native iteration in the form of loops and conditional logic such as if/then/else statements.  For example, we needed to capture information about all the configured Virtual Private Clouds (VPC) in all available AWS regions. Manually, we would have needed to log into the console, change into each region, navigate to the VPC service, then copy and paste each VPC ID into the report. Then, for each VPC ID, we’d need to navigate to the Gateways, Subnets, Route Tables, Network ACL, DHCP Options, Security Groups, and VPC Peering sub-sections to collect all the required information needed to complete the report.

    Instead, once the script was developed, we could simply supply a list of account numbers and let the scripts iterate through all regions and service endpoints, building the reports for us – trimming the required effort from multiple hours of manual data gathering and evaluation to approximately 5 minutes.

    This is just one example of a countless number of use cases for employing automation to simplify your current business processes.

    If you would like more information on automation and how you may be able to leverage it to make your life a little easier,
    contact TekStream today!

  • Setting up MFA with SNS and Java

    Setting up MFA with SNS and Java

    Rimpi Mathur | Technical Architect

    To provide better security and avoid unauthorized access to your applications, you should enable multi-factor authentication (MFA). This blog explains how to set up MFA using AWS APIs and services.

    What is MFA?

    With identity theft and cybercrime on the rise, multi-factor authentication (MFA) is a good way to improve your account security. MFA adds an additional layer of identity validation along with the basic login credentials. It is a unique number that is valid for a short duration of time and is sent to a device of your choice. This number is typically sent to an email address or cell phone number, but it can also be accessed using a specialty app.

    Technology

    We will be using the following technologies to achieve our goal.

    • • AWS SNS API
    • • Java 1.8 or higher
    • • Eclipse or any other IDE
    • • Maven for code build

     

    First, let’s look at sending MFA using the AWS admin console.

    Sending text message to cell phone using Amazon Simple Notification Service


    • • AWS Console Settings


    1.  Under “Simple Notification Service,” click on Test Messaging (SMS).
    2.  Make sure your account is not in the SMS sandbox; in sandbox mode, you can send a maximum of 10 text messages. Submit a request for Service Limit Increase. This normally takes a day to be approved by AWS.
    3.  From the console, purchase an origination number. This is a 10-digit toll-free number that will be used for sending out messages. This number is assigned by AWS.
    4.  To send a message from the console click on “Publish Text Message.”
      AWS SMS mobile text messaging  setup dialog box.
    5. Enter all the information in each box.
    Publish SMS message, Details in AWS console settings.
    Destination phone number
    Country-specific attributes, Entity ID, Template ID in Java.

    Now that we know how to send an MFA code from the console, let’s integrate this into our code.

    We will see how we can send the MFA code post-login from our codebase.

    Generate MFA code using Java

    There are many ways of creating a  6-digit number. One of the simplest ways is to use the Random() method in Java.


    • • Code for sending messages using SNS.


     

      1. We will import six packages that are required for defining the settings in AWS.

    com.amazonaws.regions.Regions;

    com.amazonaws.services.sns.AmazonSNSAsync;

    com.amazonaws.services.sns.AmazonSNSAsyncClientBuilder;

    com.amazonaws.services.sns.model.MessageAttributeValue;

    com.amazonaws.services.sns.model.PublishRequest;

    com.amazonaws.services.sns.model.PublishResult;

      1. Sample code for creating a text message.

    There are three AWS attributes that need to be set: region, maximum cost, and SMS type.

    public void sendSMS(String message, String phoneNumber) {

    // Initializes the message, phone number, aws attributes, and sends the code.

    try {

    PublishResult result = initSnsClient()
         .publish(new PublishRequest()
    .withMessage(message)
    .withPhoneNumber(phoneNumber)
    .withMessageAttributes(initSmsAttributes()));

    } catch (Exception e)

    }

    // The AWS region you will use for sending text messages; this region should be the same region that you moved to production mode (from sandbox) in the initial setting from AWS console.

    private AmazonSNSAsync initSnsClient() {

    AmazonSNSAsync snsClient =  AmazonSNSAsyncClientBuilder.standard()

    .withRegion(Regions.US_EAST_2).build();

    return snsClient;

    }

    // Sets the max price for sending each text message.

    private Map<String, MessageAttributeValue> initSmsAttributes() {

    if(smsAttributes == null) {

    smsAttributes = new HashMap<String, MessageAttributeValue>();

    smsAttributes.put(“AWS.SNS.SMS.MaxPrice”, new MessageAttributeValue()

    .withStringValue(“0.10″))

    .withDataType(“Number”));

    // Sets the type to Promotional (non-critical) or Transactional (message sent with high priority).

    smsAttributes.put(“AWS.SNS.SMS.SMSType”, new MessageAttributeValue()

    .withStringValue(“Transactional “))

    .withDataType(“String”));

    }

    return smsAttributes;

    }

        1. This code can easily be called from any other class for sending the text message.

        • • Sending MFA code using E-mail


    An e-mail can be sent using the helper class JmsTemplate

    private void addMessageToQueue(final Email email) {

    try {

        jmsTemplate.send(new MessageCreator() {

    @Override

    public Message createMessage(Session session) throws JMSException {

    return session.createObjectMessage(email);

    }

    });

    }

    catch (Exception e) {

    throw e;

    }

    }

    }

    Contact us for more help setting up MFA with SNS and Java!