Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      CodeSOD: A Unique Way to Primary Key

      July 22, 2025

      BrowserStack launches Figma plugin for detecting accessibility issues in design phase

      July 22, 2025

      Parasoft brings agentic AI to service virtualization in latest release

      July 22, 2025

      Node.js vs. Python for Backend: 7 Reasons C-Level Leaders Choose Node.js Talent

      July 21, 2025

      The best CRM software with email marketing in 2025: Expert tested and reviewed

      July 22, 2025

      This multi-port car charger can power 4 gadgets at once – and it’s surprisingly cheap

      July 22, 2025

      I’m a wearables editor and here are the 7 Pixel Watch 4 rumors I’m most curious about

      July 22, 2025

      8 ways I quickly leveled up my Linux skills – and you can too

      July 22, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025
      Recent

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025

      Zero Trust & Cybersecurity Mesh: Your Org’s Survival Guide

      July 22, 2025

      Execute Ping Commands and Get Back Structured Data in PHP

      July 22, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025
      Recent

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025

      “I don’t think I changed his mind” — NVIDIA CEO comments on H20 AI GPU sales resuming in China following a meeting with President Trump

      July 22, 2025

      Galaxy Z Fold 7 review: Six years later — Samsung finally cracks the foldable code

      July 22, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Machine Learning»Build real-time travel recommendations using AI agents on Amazon Bedrock

    Build real-time travel recommendations using AI agents on Amazon Bedrock

    July 18, 2025

    Generative AI is transforming how businesses deliver personalized experiences across industries, including travel and hospitality. Travel agents are enhancing their services by offering personalized holiday packages, carefully curated for customer’s unique preferences, including accessibility needs, dietary restrictions, and activity interests. Meeting these expectations requires a solution that combines comprehensive travel knowledge with real-time pricing and availability information.

    In this post, we show how to build a generative AI solution using Amazon Bedrock that creates bespoke holiday packages by combining customer profiles and preferences with real-time pricing data. We demonstrate how to use Amazon Bedrock Knowledge Bases for travel information, Amazon Bedrock Agents for real-time flight details, and Amazon OpenSearch Serverless for efficient package search and retrieval.

    Solution overview

    Travel agencies face increasing demands for personalized recommendations while struggling with real-time data accuracy and scalability. Consider a travel agency that needs to offer accessible holiday packages: they need to match specific accessibility requirements with real-time flight and accommodation availability but are constrained by manual processing times and outdated information in traditional systems. This AI-powered solution combines personalization with real-time data integration, enabling the agency to automatically match accessibility requirements with current travel options, delivering accurate recommendations in minutes rather than hours.The solution uses a three-layer architecture to help travel agents create personalized holiday recommendations:

    • Frontend layer – Provides an interface where travel agents input customer requirements and preferences
    • Orchestration layer – Processes request and enriches them with customer data
    • Recommendation layer – Combines two key components:
      • Travel data storage – Maintains a searchable repository of travel packages
      • Real-time information retrieval – Fetches current flight details through API integration

    The following diagram illustrates this architecture.

    AWS travel recommendation architecture diagram showing customer request flow through multiple service layers

    With this layered approach, travel agents can capture customer requirements, enrich them with stored preferences, integrate real-time data, and deliver personalized recommendations that match customer needs. The following diagram illustrates how these components are implemented using AWS services.

    Architecture Diagram of the Holiday Recommendation system

    The AWS implementation includes:

    • Amazon API Gateway – Receives requests and routes them to AWS Lambda functions facilitating secure API calls for retrieving recommendations
    • AWS Lambda – Processes input data, creates the enriched prompt, and executes the recommendation workflow
    • Amazon DynamoDB – Stores customer preferences and travel history
    • Amazon Bedrock Knowledge Bases – Helps travel agents build a curated database of destinations, travel packages, and deals, making sure recommendations are based on reliable and up-to-date information
    • Amazon OpenSearch Serverless – Enables simple, scalable, and high-performing vector search
    • Amazon Simple Storage Service (Amazon S3) – Stores large datasets such as flight schedules and promotional materials
    • Amazon Bedrock Agents – Integrates real-time information retrieval, making sure recommended itineraries reflect current availability, pricing, and scheduling through external API integrations

    This solution uses a AWS CloudFormation template that automatically provisions and configures the required resources. The template handles the complete setup process, including service configurations and necessary permissions.

    For the latest information about service quotas that might affect your deployment, refer to AWS service quotas.

    Prerequisites

    To deploy and use this solution, you must have the following:

    • An AWS account with access to Amazon Bedrock
    • Permissions to create and manage the following services:
      • Amazon Bedrock
      • Amazon OpenSearch Serverless
      • Lambda
      • DynamoDB
      • Amazon S3
      • API Gateway
    • Access to foundation models in Amazon Bedrock for Amazon Titan Text Embeddings V2 and Anthropic Claude 3 Haiku models

    Deploy the CloudFormation stack

    You can deploy this solution in your AWS account using AWS CloudFormation. Complete the following steps:

    1. Choose Launch Stack:

    Launch Stack

    You will be redirected to the Create stack wizard on the AWS CloudFormation console with the stack name and the template URL already filled in.

    1. Leave the default settings and complete the stack creation.
    2. Choose View stack events to go to the AWS CloudFormation console to see the deployment details.

    The stack takes around 10 minutes to create the resources. Wait until the stack status is CREATE_COMPLETE before continuing to the next steps.

    The CloudFormation template automatically creates and configures components for data storage and management, Amazon Bedrock, and the API and interface.

    Data storage and management

    The template sets up the following data storage and management resources:

    • An S3 bucket and with a sample dataset (travel_data.json and promotions.csv), prompt template, and the API schema

    S3 bucket containing JSON and CSV files for travel recommendation system

    • DynamoDB tables populated with sample user profiles and travel history

    DynamoDB tables list showing travel and user preference tables

    • An OpenSearch Serverless collection with optimized settings for travel package searches

    OpenSearch Collection View

    • A vector index with settings compatible with the Amazon Bedrock knowledge base

    OpenSearch vector index configuration for AI-powered travel recommendations using Amazon Bedrock

    Amazon Bedrock configuration

    For Amazon Bedrock, the CloudFormation template creates the following resources:

    • A knowledge base with the travel dataset and data sources ingested from Amazon S3 with automatic synchronization

    AWS Knowledge Base configuration page showing HolidayRecommendationKB settings

    • An Amazon Bedrock agent, which is automatically prepared

    Amazon Bedrock Agent overview

    • A new version and alias for the agent

    Amazon Bedrock Agent Alias configuration

    • Agent action groups with mock flight data integration

    Amazon Bedrock Agent action group

    • An action group invocation, configured with the FlightPricingLambda Lambda function and the API schema retrieved from the S3 bucket

    Amazon Bedrock Agent action configuration

    API and interface setup

    To enable API access and the UI, the template configures the following resources:

    • API Gateway endpoints
    • Lambda functions with a mock flight API for demonstration purposes
    • A web interface for travel agents

    Verify the setup

    After stack creation is complete, you can verify the setup on the Outputs tab of the AWS CloudFormation console, which provides the following information:

    • WebsiteURL – Access the travel agent interface
    • ApiEndpoint – Use for programmatic access to the recommendation system

    CloudFormation stack showing API endpoint and website URL outputs

    Test the endpoints

    The web interface provides an intuitive form where travel agents can input customer requirements, including:

    • Customer ID (for example, Joe or Will)
    • Travel budget
    • Preferred dates
    • Number of travelers
    • Travel style

    Empty travel recommendation interface with user preference input fields

    You can call the API directly using the following code:

    curl -X POST 
      <ApiEndpoint> 
      -H 'Content-Type: application/json' 
      -d '{
        "userId": "Joe",
        "budget": "3000 GBP",
        "duration": "7 days",
        "travelDate": "2025-07-15",
        "numberOfTravelers": 2
      }'

    Test the solution

    For demonstration purposes, we create sample user profiles in the UserPreferences and TravelHistory tables in DynamoDB.

    The UserPreferences table stores user-specific travel preferences. For instance, Joe represents a luxury traveler with wheelchair accessibility requirements.

    Database item editor showing user travel preferences including budget, dietary restrictions, and accessibility needs

    Will represents a budget traveler with elderly-friendly needs. These profiles help showcase how the system handles different customer requirements and preferences.

    Amazon DynamoDB item editor displaying travel preferences and accessibility needs

    The TravelHistory table stores past trips taken by users. The following tables show the past trips taken by the user Joe, showing destinations, trip durations, ratings, and travel dates.

    DynamoDB table view showing travel history entries with destination and duration details.

    Let’s walk through a typical use case to demonstrate how a travel agent can use this solution to create personalized holiday recommendations.Consider a scenario where a travel agent is helping Joe, a customer who requires wheelchair accessibility, plan a luxury vacation. The travel agent enters the following information:

    • Customer ID: Joe
    • Budget: 4,000 GBP
    • Duration: 5 days
    • Travel dates: July 15, 2025
    • Number of travelers: 2
    • Travel style: Luxury

    AI-driven holiday planner interface displaying user preferences and detailed Santorini travel recommendations powered by Amazon Bedrock

    When a travel agent submits a request, the system orchestrates a series of actions through the PersonalisedHolidayFunction Lambda function, which will query the knowledge base, check real-time flight information using the mock API, and return personalized recommendations that match the customer’s specific needs and preferences. The recommendation layer uses the following prompt template:

    Based on the profile and requirements:
    
    User Preferences:
    - Travel Preferences: {travelStyle}
    - Interests: {interests}
    - Dietary Restrictions: {dietaryRestrictions}
    - Accessibility Needs: {accessibility}
    
    Current Request:
    - Budget: {budget}
    - Duration: {duration}
    - Travel Date: {travelDate}
    - Number of Travelers: {numberOfTravelers}
    
    Previous Destinations: {previousDestinations}
    
    Instructions:
    1. Match the user's budget, travel style and interests
    2. Consider dietary restrictions and accessibility needs
    3. Avoid previously visited destinations
    4. Include:
       - Recommended destinations
       - Suitable accommodations
       - Relevant activities and experiences
       - Transportation options
       - Estimated cost breakdown
       - Travel tips
    
    Please follow the <Instructions> and provide a personalized holiday recommendation in the below format:
    Destination: [Primary recommended destination]
    
    [Detailed recommendation]

    The system retrieves Joe’s preferences from the user profile, including:

    {
        "userPreferences": {
            "preferences": "Prefer warm climate and cultural experiences",
            "budget": 3000,
            "duration": "5 days",
            "travelDate": "2025-03-04",
            "interests": [
                "photography",
                "food",
                "beach"
            ],
            "travelStyle": "Luxury",
            "numberOfTravelers": 2,
            "dietaryRestrictions": [
                "plant based",
                "vegetarian"
            ],
            "accessibility": [
                "wheelchair-accessible"
            ],
            "previousDestinations": [
                "Maldives",
                "Bali"
            ]
        }
    }

    The system then generates personalized recommendations that consider the following:

    • Destinations with proven wheelchair accessibility
    • Available luxury accommodations
    • Flight details for the recommended destination

    Each recommendation includes the following details:

    • Detailed accessibility information
    • Real-time flight pricing and availability
    • Accommodation details with accessibility features
    • Available activities and experiences
    • Total package cost breakdown

    Clean up

    To avoid incurring future charges, delete the CloudFormation stack. For more information, see Delete a stack from the CloudFormation console.

    The template includes proper deletion policies, making sure the resources you created, including S3 buckets, DynamoDB tables, and OpenSearch collections, are properly removed.

    Next steps

    To further enhance this solution, consider the following:

    • Explore multi-agent capabilities:
      • Create specialized agents for different travel aspects (hotels, activities, local transport)
      • Enable agent-to-agent communication for complex itinerary planning
      • Implement an orchestrator agent to coordinate responses and resolve conflicts
    • Implement multi-language support using multi-language foundation models in Amazon Bedrock
    • Integrate with customer relationship management (CRM) systems

    Conclusion

    In this post, you learned how to build an AI-powered holiday recommendation system using Amazon Bedrock that helps travel agents deliver personalized experiences. Our implementation demonstrated how combining Amazon Bedrock Knowledge Bases with Amazon Bedrock Agents effectively bridges historical travel information with real-time data needs, while using serverless architecture and vector search for efficient matching of customer preferences with travel packages.The solution shows how travel recommendation systems can balance comprehensive travel knowledge, real-time data accuracy, and personalization at scale. This approach is particularly valuable for travel organizations needing to integrate real-time pricing data, handle specific accessibility requirements, or scale their personalized recommendations. This solution provides a practical starting point with clear paths for enhancement based on specific business needs, from modernizing your travel planning systems or handling complex customer requirements.

    Related resources

    To learn more, refer to the following resources:

    • Documentation:
      • Amazon Bedrock Documentation
      • Automate tasks in your application using AI agents
      • Retrieve data and generate AI responses with Amazon Bedrock Knowledge Bases
      • Amazon OpenSearch Serverless Developer Guide
      • Building Lambda functions with Python
    • Code samples:
      • Amazon Bedrock RAG with Knowledge Bases and Agents
      • Amazon Bedrock Samples Repository
      • Amazon Bedrock Agent Samples Repository
    • Additional learning:
      • AWS Machine Learning Blog
      • AWS Training and Certification

    About the Author

    Vishnu Vardhini

    Vishnu Vardhini is a Solutions Architect at AWS based in Scotland, focusing on SMB customers across industries. With expertise in Security, Cloud Engineering and DevOps, she architects scalable and secure AWS solutions. She is passionate about helping customers leverage Machine Learning and Generative AI to drive business value.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleSignal-kloon TeleMessage SGNL gebruikte kwetsbare Spring Boot Actuator
    Next Article Deploy a full stack voice AI agent with Amazon Nova Sonic

    Related Posts

    Machine Learning

    How to Evaluate Jailbreak Methods: A Case Study with the StrongREJECT Benchmark

    July 22, 2025
    Machine Learning

    Boolformer: Symbolic Regression of Logic Functions with Transformers

    July 22, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-47942 – Open edX Platform Python Lib Zip File Download Unauthorized Access Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    HNS-2025-10 – HN Security Advisory – Local privilege escalation in Zyxel uOS

    Security

    Course: WordPress Theme Development (Core Concepts)

    Development

    I hate spending money on PCs — that’s why I recommend these affordable mini PCs instead of a desktop or laptop on Prime Day

    News & Updates

    Highlights

    CVE-2025-47812 – Wing FTP Server Lua Code Injection Vulnerability

    July 10, 2025

    CVE ID : CVE-2025-47812

    Published : July 10, 2025, 5:15 p.m. | 29 minutes ago

    Description : In Wing FTP Server before 7.4.4. the user and admin web interfaces mishandle ” bytes, ultimately allowing injection of arbitrary Lua code into user session files. This can be used to execute arbitrary system commands with the privileges of the FTP service (root or SYSTEM by default). This is thus a remote code execution vulnerability that guarantees a total server compromise. This is also exploitable via anonymous FTP accounts.

    Severity: 10.0 | CRITICAL

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    Trinper Backdoor Exploiting Chrome Zero-Day CVE-2025-2783

    June 18, 2025

    CVE-2024-57233 – NETGEAR RAX5 Command Injection Vulnerability

    May 5, 2025

    CVE-2025-4338 – Lantronix Device Installer XXE Injection Vulnerability

    May 22, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.