Monday, 23 September 2024

Device Farm  lab step by step with screenshot

 AWS Device Farm is a service that allows you to test your mobile apps on real devices in the cloud. It provides a wide range of devices and operating systems for testing your apps across different configurations.

1. Prerequisites

  • An AWS account
  • A mobile app (Android or iOS)

2. Create a Device Farm Project

  • Navigate to Device Farm: In the AWS Management Console, search for "Device Farm" and select the service.
  • Create a project: Click on "Create project".
  • Provide details: Give your project a name and description.
  • Create the project: Click "Create project".
  • Image of creating a Device Farm project

3. Upload Your App

  • Select your project: Click on the project you just created.
  • Upload app: Click on "Upload app".
  • Choose a file: Select your mobile app file (APK for Android, IPA for iOS).
  • Upload the app: Click "Upload".
  • Image of uploading an app to Device Farm

4. Create a Run

  • Select your project: Click on the project you created.
  • Create a run: Click on "Create run".
  • Choose a device pool: Select the desired device pool (e.g., "Latest Android devices").
  • Configure settings: Specify additional settings like test type (e.g., exploration, fuzzing), test duration, and network settings.
  • Create the run: Click "Create run".
  • Image of creating a run in Device Farm

5. Monitor the Run

  • View run details: Click on the created run to view its status and progress.
  • Check test results: Once the run is complete, you can view the test results, including screenshots, logs, and performance metrics.
  • Image of viewing run details in Device Farm

Additional Steps

  • Create custom device pools: Create custom device pools with specific device configurations to target your testing needs.
  • Integrate with CI/CD: Integrate Device Farm with your CI/CD pipeline for automated testing.
  • Use custom test frameworks: Use custom test frameworks to write your own test cases.
  • Analyze test results: Use the provided tools to analyze test results and identify issues.

AWS AppSync lab step by step with screenshot

 AWS AppSync is a fully managed GraphQL service that makes it easy to build scalable, real-time applications. It offers features like data synchronization, offline support, and integration with other AWS services.

1. Prerequisites

  • An AWS account
  • Node.js and npm installed

2. Create an AppSync API

  • Navigate to AppSync: In the AWS Management Console, search for "AppSync" and select the service.
  • Create API: Click on "Create API".
  • Provide details: Give your API a name and description.
  • Choose a schema: Select a schema or create a new one.
  • Create the API: Click "Create API".
  • Image of creating an AppSync API

3. Define Your GraphQL Schema

  • Edit schema: Click on the "Schema" tab in your API.
  • Define types: Define the types of data you want to expose in your API (e.g., User, Post).
  • Define resolvers: Create resolvers that map GraphQL operations (queries, mutations, subscriptions) to underlying data sources.

4. Configure Data Sources

  • Add data source: Click on "Data sources" in your API.
  • Choose a data source type: Select a data source type (e.g., Amazon DynamoDB, AWS Lambda).
  • Configure settings: Provide the necessary settings for the data source.
  • Create the data source: Click "Create data source".
  • Image of configuring a data source in AppSync

5. Create a Resolver

  • Select a type: Click on a type in your schema.
  • Create resolver: Click on "Create resolver".
  • Choose a field: Select the field you want to resolve.
  • Configure resolver: Configure the resolver settings, including the data source and the request mapping template.
  • Create the resolver: Click "Create resolver".
  • Image of creating a resolver in AppSync

6. Test Your API

  • Use the GraphQL Playground: Use the GraphQL Playground integrated into the AppSync console to test your API.
  • Execute queries and mutations: Send queries and mutations to your API and inspect the results.

Additional Steps

  • Enable subscriptions: Configure subscriptions to receive real-time updates when data changes.
  • Integrate with other AWS services: AppSync can be integrated with other AWS services like Cognito for authentication and AWS IoT for real-time data streams.
  • Use AWS Amplify: Use AWS Amplify to build client-side applications that interact with your AppSync API.

AWS Amplify  lab

 AWS Amplify is a serverless platform that simplifies the development and deployment of web and mobile applications. It provides features like hosting, authentication, data storage, and more.

1. Prerequisites

  • An AWS account
  • Node.js and npm installed

2. Create an Amplify App

  • Initialize Amplify: Open a terminal and navigate to your project directory. Run the following command:
    Bash
    amplify init
    
  • Choose a framework: Select the framework you're using (e.g., React, Angular, Vue).
  • Provide details: Provide details about your project, such as the name and description.
  • Create the Amplify app: Follow the prompts to create the Amplify app.

3. Add Features

  • Add authentication: Use the following command to add authentication:
    Bash
    amplify add auth
    
    Follow the prompts to configure authentication settings.
  • Add API: Use the following command to add an API:
    Bash
    amplify add api
    
    Provide details about your API, such as the GraphQL schema.
  • Add storage: Use the following command to add storage:
    Bash
    amplify add storage
    
    Provide details about your storage configuration, such as the bucket name.

4. Push Changes to the Cloud

  • Push changes: Run the following command to push your changes to the cloud:
    Bash
    amplify push
    

5. Deploy Your Application

  • Deploy to the cloud: Once your changes are pushed, you can deploy your application to the cloud using the Amplify console or command-line tools.

Example: Creating a React App with Authentication and API

  • Create a React app: Use Create React App to create a new React project.
  • Initialize Amplify: Follow the steps above to initialize Amplify and add authentication and API features.
  • Modify your React app: Use the Amplify libraries to integrate authentication and API functionality into your React components.
  • Push and deploy: Push your changes to the cloud and deploy your application.

Note: The specific commands and steps may vary depending on the framework and features you're using. Refer to the Amplify documentation for more details and examples.

Screenshots:

  • Amplify init:
    Image of Amplify init command in terminal
  • Amplify add features:
    Image of Amplify add features commands in terminal
  • Amplify push:
    Image of Amplify push command in terminal
  • Amplify console:
    Image of Amplify console showing your app

VPC AWS lab

 AWS VPC (Virtual Private Cloud) allows you to create a virtual network within AWS, providing a secure and isolated environment for your resources.

1. Create a VPC

  • Navigate to VPC: In the AWS Management Console, search for "VPC" and select the service.
  • Create a VPC: Click on "Create VPC".
  • Provide details: Specify the CIDR block range for your VPC.
  • Create the VPC: Click "Create VPC".
  • Image of creating a VPC in AWS

2. Create a Subnet

  • Select your VPC: Click on the VPC you just created.
  • Create a subnet: Click on "Create subnet".
  • Provide details: Specify the CIDR block range for your subnet and choose an availability zone.
  • Create the subnet: Click "Create subnet".
  • Image of creating a subnet in AWS

3. Create an Internet Gateway

  • Navigate to VPC: In the AWS Management Console, search for "VPC" and select the service.
  • Create an internet gateway: Click on "Create internet gateway".
  • Create the gateway: Click "Create internet gateway".
  • Image of creating an internet gateway in AWS

4. Attach the Internet Gateway to Your VPC

  • Select your VPC: Click on the VPC you created.
  • Attach internet gateway: Click on "Attach internet gateway".
  • Choose the gateway: Select the internet gateway you created.
  • Attach the gateway: Click "Attach".

5. Create a Route Table

  • Select your VPC: Click on the VPC you created.
  • Create a route table: Click on "Create route table".
  • Create the route table: Click "Create route table".
  • Image of creating a route table in AWS

6. Associate the Route Table with Your Subnet

  • Select your subnet: Click on the subnet you created.
  • Associate route table: Click on "Associate route table".
  • Choose the route table: Select the route table you created.
  • Associate the route table: Click "Associate".

7. Create a Route

  • Select your route table: Click on the route table you created.
  • Create a route: Click on "Create route".
  • Provide details: Specify the destination CIDR block (e.g., 0.0.0.0/0 for internet traffic) and the target (the internet gateway).
  • Create the route: Click "Create route".
  • Image of creating a route in AWS

8. Launch an EC2 Instance

  • Navigate to EC2: In the AWS Management Console, search for "EC2" and select the service.
  • Launch an instance: Click on "Launch instance".
  • Choose an AMI: Select an Amazon Machine Image (AMI).
  • Configure instance details: Specify instance type, key pair, security group, and network settings.
  • Launch the instance: Click "Launch instances".
  • Image of launching an EC2 instance in AWS

9. Test Connectivity

  • Connect to your instance: Connect to your EC2 instance using SSH.
  • Test internet connectivity: Try accessing websites or other internet resources from your instance.

Route 53 AWS lab

 AWS Route 53 is a highly scalable DNS service that provides reliable domain name resolution for your applications. It offers various features like routing policies, health checks, and DNS failover.

1. Prerequisites

  • An AWS account
  • A registered domain name

2. Create a Hosted Zone

  • Navigate to Route 53: In the AWS Management Console, search for "Route 53" and select the service.
  • Create a hosted zone: Click on "Create hosted zone".
  • Provide details: Enter the domain name you want to create a hosted zone for.
  • Create the zone: Click "Create".
  • Image of creating a hosted zone in AWS Route 53

3. Create a Record Set

  • Select your hosted zone: Click on the hosted zone you just created.
  • Create a record set: Click on "Create record set".
  • Choose a record type: Select the appropriate record type (e.g., A, CNAME, MX).
  • Provide details: Enter the name of the record, the value (e.g., IP address, domain name), and any additional settings.
  • Create the record set: Click "Create".
  • Image of creating a record set in AWS Route 53

4. Configure Routing Policies (Optional)

  • Select your record set: Click on the record set you want to configure.
  • Edit the record set: Click on "Edit record set".
  • Choose a routing policy: Select a routing policy like weighted, latency, or failover.
  • Configure settings: Provide the necessary settings for the selected routing policy.
  • Save changes: Click "Save changes".

5. Configure Health Checks (Optional)

  • Create a health check: Click on "Create health check".
  • Choose a health check type: Select the appropriate health check type (e.g., HTTP, HTTPS, TCP).
  • Provide details: Configure the health check settings, such as the endpoint and health check interval.
  • Create the health check: Click "Create health check".
  • Associate the health check with your record set: Associate the health check with your record set to enable health-based routing.

6. Test DNS Resolution

  • Use a DNS lookup tool: Use a tool like nslookup or dig to test DNS resolution for your domain name.
  • Verify the resolved IP address: Ensure that the resolved IP address is correct based on your record set configuration.

AWS Private 5G lab

 AWS Private 5G provides a managed service for deploying and operating private 5G networks on AWS infrastructure. It's ideal for businesses that require low-latency, high-bandwidth, and secure network connectivity.

1. Prerequisites

  • An AWS account
  • A supported AWS region (check the AWS documentation for the latest list)

2. Create a Private 5G Network

  • Navigate to Private 5G:
    In the AWS Management Console, search for "Private 5G" and select the service.
  • Create a network: Click on "Create network".
  • Provide details: Give your network a name and description.
  • Choose a location: Select the AWS region where you want to deploy the network.
  • Configure settings: Specify additional settings like network capacity, frequency bands, and security options.
  • Create the network: Click "Create network".
  • Image of creating a Private 5G network in AWS

3. Deploy a Core Network

  • Select your network: Click on the network you just created.
  • Deploy a core network: Click on "Deploy core network".
  • Choose a core network type: Select the appropriate core network type based on your requirements (e.g., standalone, non-standalone).
  • Configure settings: Specify settings like radio access network (RAN) configuration and core network functions.
  • Deploy the core network: Click "Deploy core network".
  • Image of deploying a core network in AWS Private 5G

4. Deploy User Equipment (UE)

  • Select your network: Click on the network you just created.
  • Deploy UE: Click on "Deploy UE".
  • Provide details: Specify the UE type (e.g., mobile device, drone) and configuration settings.
  • Deploy the UE: Click "Deploy UE".
  • Image of deploying UE in AWS Private 5G

5. Test the Network

  • Connect UE: Connect your UE to the private 5G network.
  • Test connectivity: Test network connectivity and performance using applications or tools.

Additional Steps

  • Configure network slicing: Create network slices for different use cases with specific requirements.
  • Integrate with other AWS services: AWS Private 5G can be integrated with other AWS services like AWS IoT for device management and AWS IoT Greengrass for edge computing.
  • Monitor and manage network: Use AWS CloudWatch to monitor network performance and manage network resources.

Direct Connect AWS lab

 AWS Direct Connect provides a dedicated, private network connection between your on-premises data center and AWS. It offers higher bandwidth, lower latency, and improved security compared to public internet connections.

1. Prerequisites

  • An AWS account
  • A physical connection to a Direct Connect location in your region

2. Create a Direct Connect Connection

  • Navigate to Direct Connect: In the AWS Management Console, search for "Direct Connect" and select the service.
  • Create a connection: Click on "Create connection".
  • Choose a location: Select the Direct Connect location where your physical connection is located.
  • Configure settings: Specify the connection bandwidth, location, and other settings.
  • Create the connection: Click "Create connection".
  • Image of creating a Direct Connect connection

3. Create a Virtual Interface

  • Select your connection: Click on the connection you just created.
  • Create a virtual interface: Click on "Create virtual interface".
  • Configure settings: Specify the virtual interface name, VLAN ID, and other settings.
  • Create the virtual interface: Click "Create virtual interface".
  • Image of creating a virtual interface in Direct Connect

4. Configure Your Router

  • Configure your router: Configure your on-premises router to establish a connection to the Direct Connect location using the specified VLAN ID and IP address.

5. Test the Connection

  • Ping the AWS gateway: Ping the AWS gateway IP address from your on-premises network to verify connectivity.
  • Test network traffic: Send network traffic between your on-premises network and AWS to ensure proper routing.
  • Image of testing a Direct Connect connection

Additional Steps

  • Create multiple virtual interfaces: If you need to connect multiple networks to AWS, create multiple virtual interfaces.
  • Configure BGP: Configure Border Gateway Protocol (BGP) to exchange routing information between your on-premises network and AWS.
  • Use Direct Connect Transit Gateway: If you have multiple AWS accounts or VPCs, consider using Direct Connect Transit Gateway to centralize connectivity.
  • Monitor performance: Use AWS CloudWatch to monitor the performance of your Direct Connect connection.