Recent Posts
Archives

Posts Tagged ‘CostOptimization’

PostHeaderIcon [AWSReInvent2025] Optimizing AWS Costs: Developer-Centric Tools and Methodologies

Lecturer

Kenneth Walsh is a Senior Technical Evangelist at AWS, specializing in cloud financial management (FinOps) and developer productivity. With a background in software engineering and systems architecture, Kenneth focuses on empowering developers to treat “cost as a first-class citizen” in the software development lifecycle. Stacy McOwan is an AWS Developer Advocate who bridges the gap between high-level architectural decisions and day-to-day coding practices. Stacy is a frequent speaker on serverless efficiency and the application of AI to infrastructure management. Together, they provide a pragmatic guide for developers to identify inefficiencies and automate cost optimization using native AWS tools.

Abstract

For the modern cloud developer, the responsibility for system performance and reliability has expanded to include cost efficiency. As cloud environments scale, manual cost management becomes unsustainable, necessitating the adoption of automated, developer-led optimization practices. This article examines the tools and techniques available on AWS to reduce cloud spend without compromising performance. We delve into the use of Amazon Q Developer for AI-powered architectural recommendations and the Kiro CLI for identifying “low-hanging fruit” in resource utilization. The discussion highlights the transition from reactive cost analysis to a “cost-aware” development culture, where optimization is integrated into the CI/CD pipeline. Through the lens of compute, serverless, and observability, this article provides a blueprint for building fiscally responsible applications that maximize the value of every cloud dollar.

The Shift Toward Cost-Aware Development

Historically, cost management was the domain of the finance department or the infrastructure team. However, in a cloud-native world, the code written by a developer directly impacts the AWS bill. A poorly optimized database query or an oversized Lambda function can lead to significant unnecessary expenditure. Kenneth introduces the concept of “cost as a design constraint,” similar to security or latency. When developers are empowered with the right data, they can make informed trade-offs early in the design phase.

Stacy notes that the primary barrier to optimization is often “visibility and friction.” If finding an expensive resource requires navigating dozens of dashboards, it won’t happen. The goal is to bring cost data into the developer’s natural environment—the IDE and the command line. By making optimization a “feature” of the development process, organizations can foster a culture where efficiency is celebrated and waste is proactively eliminated.

AI-Driven Optimization with Amazon Q Developer

One of the most significant innovations in cloud management is the integration of Generative AI into the optimization workflow. Amazon Q Developer serves as a specialized AI assistant that can analyze a developer’s infrastructure and suggest specific, actionable changes. Kenneth demonstrates how Amazon Q can be used to “right-size” instances by analyzing historical CPU and memory usage patterns.

Beyond simple resource sizing, Amazon Q can provide architectural guidance. For example, it might suggest moving a synchronous process to an asynchronous, event-driven model using Amazon SQS to reduce the “idle time” of compute resources. This level of insight allows developers to not just “pay less for what they have” but to “build better systems that cost less by design.”

'''# Example of using AWS SDK to query for cost-optimization recommendations'''
import boto3

client = boto3.client('support')

def get_cost_recommendations():
    response = client.describe_trusted_advisor_check_summaries(
        checkIds=['eW927uS9S'] # Example ID for Cost Optimization checks
    )
    for summary in response['summaries']:
        print(f"Check: {summary['name']}, Potential Savings: {summary['hasFindings']}")

get_cost_recommendations()

The Kiro CLI: Automating the Identification of Waste

While AI provides high-level guidance, developers often need tactical tools to find specific instances of waste. The Kiro CLI (Cloud Intelligence Reports) is an open-source tool that allows developers to run “cost audits” directly from their terminal. Stacy explains that Kiro can identify “orphaned” resources—such as unattached EBS volumes, old snapshots, or elastic IPs that are not associated with an instance—which are often the biggest contributors to “invisible” cloud spend.

The power of Kiro lies in its ability to be integrated into automation. By running Kiro as part of a weekly “clean-up” script or as a pre-deployment check, teams can ensure that their environments don’t accumulate technical and financial debt over time. Kenneth emphasizes that “low-hanging fruit” optimization—cleaning up what you aren’t using—should be the first step for any organization looking to reduce its cloud bill.

Serverless and Observability: Efficiency in Action

Serverless technologies like AWS Lambda are inherently cost-efficient because they follow a “pay-for-value” model. However, Stacy warns that even serverless can be wasteful if misconfigured. “Lambda Power Tuning” is a methodology where developers test different memory configurations to find the optimal balance between execution speed and cost. Since Lambda charges based on GB-seconds, doubling the memory can sometimes reduce the cost if it cuts the execution time by more than half.

Observability is another area where costs can spiral. Logging everything at “DEBUG” level in production creates massive CloudWatch bills. The lecturers advocate for “intelligent logging,” where detailed logs are only captured during incidents or for a small percentage of transactions. By using Amazon CloudWatch Logs Insights to analyze logging patterns, developers can identify which log groups are generating the most cost and adjust their retention policies accordingly.

Conclusion: Building a Sustainable Cloud Practice

Cost optimization is not a one-time event; it is a continuous practice that requires the right tools, data, and mindset. Kenneth and Stacy conclude that by leveraging AI assistants like Amazon Q and automation tools like the Kiro CLI, developers can take ownership of their cloud spend without it becoming a burden. The ultimate goal is to build applications that are not just technically sound but also economically sustainable. When cost optimization becomes an integral part of the developer workflow, the focus shifts from “cutting costs” to “optimizing value,” enabling the organization to reinvest those savings into further innovation and growth.

Links:

PostHeaderIcon [DevoxxFR2013] From Cloud Experimentation to On-Premises Maturity: Strategic Infrastructure Repatriation at Mappy

Lecturer

Cyril Morcrette serves as Technical Director at Mappy, a pioneering French provider of geographic and local commerce services with thirteen million euros in annual revenue and eighty employees. Under his leadership, Mappy has evolved from a traditional route planning service into a comprehensive platform integrating immersive street-level imagery, local business discovery, and personalized recommendations. His infrastructure strategy reflects deep experience with both cloud and on-premises environments, informed by multiple large-scale projects that pushed technological boundaries.

Abstract

Cloud computing excels at enabling rapid prototyping and handling uncertain demand, but its cost structure can become prohibitive as projects mature and usage patterns stabilize. This presentation chronicles Mappy’s journey with immersive geographic visualization — a direct competitor to Google Street View — from initial cloud deployment to eventual repatriation to on-premises infrastructure. Cyril Morcrette examines the economic, operational, and technical factors that drove this decision, providing a framework for evaluating infrastructure choices throughout the application lifecycle. Through detailed cost analysis, performance metrics, and migration case studies, he demonstrates that cloud is an ideal launch platform but often not the optimal long-term home for predictable, high-volume workloads. The session concludes with practical guidance for smooth repatriation and the broader implications for technology strategy in established organizations.

The Immersive Visualization Imperative

Mappy’s strategic pivot toward immersive geographic experiences required capabilities beyond traditional mapping: panoramic street-level imagery, 3D reconstruction, and real-time interaction. The project demanded massive storage (terabytes of high-resolution photos), significant compute for image processing, and low-latency delivery to users.

Initial estimates suggested explosive, unpredictable traffic growth. Marketing teams envisioned viral adoption, while technical teams worried about infrastructure bottlenecks. Procuring sufficient on-premises hardware would require months of lead time and capital approval — unacceptable for a market-moving initiative.

Amazon Web Services offered an immediate solution: spin up instances, store petabytes in S3, process imagery with EC2 spot instances. The cloud’s pay-as-you-go model eliminated upfront investment and provided virtually unlimited capacity.

Cloud-First Development: Speed and Agility

The project launched entirely in AWS. Development teams used EC2 for processing pipelines, S3 for raw and processed imagery, CloudFront for content delivery, and Elastic Load Balancing for web servers. Auto-scaling handled traffic spikes during marketing campaigns.

This environment enabled rapid iteration:
– Photographers uploaded imagery directly to S3 buckets
– Lambda functions triggered processing workflows
– Machine learning models (running on GPU instances) detected business facades and extracted metadata
– Processed panoramas were cached in CloudFront edge locations

Within months, Mappy delivered a functional immersive experience covering major French cities. The cloud’s flexibility absorbed the uncertainty of early adoption while development teams refined algorithms and user interfaces.

The Economics of Maturity

As the product stabilized, usage patterns crystallized. Daily active users grew steadily but predictably. Storage requirements, while large, increased linearly. Processing workloads became batch-oriented rather than real-time.

Cost analysis revealed a stark reality: cloud expenses were dominated by data egress, storage, and compute hours — all now predictable and substantial. Mappy’s existing data center, built for core mapping services, had significant spare capacity with fully amortized hardware.

Cyril presents the tipping point calculation:
– Cloud monthly cost: €45,000 (storage, compute, bandwidth)
– On-premises equivalent: €12,000 (electricity, maintenance, depreciation)
– Break-even: four months

The decision to repatriate was driven by simple arithmetic, but execution required careful planning.

Repatriation Strategy and Execution

The migration followed a phased approach:

  1. Data Transfer: Used AWS Snowball devices to move petabytes of imagery back to on-premises storage. Parallel uploads leveraged Mappy’s high-bandwidth connectivity.

  2. Processing Pipeline: Reimplemented image processing workflows on internal GPU clusters. Custom scripts replaced Lambda functions, achieving equivalent throughput at lower cost.

  3. Web Tier: Deployed Nginx and Varnish caches on existing web servers. CDN integration with Akamai preserved low-latency delivery.

  4. Monitoring and Automation: Migrated CloudWatch metrics to Prometheus/Grafana. Ansible playbooks replaced CloudFormation templates.

Performance remained comparable: page load times stayed under two seconds, and system availability exceeded 99.95%. The primary difference was cost — reduced by seventy-five percent.

Operational Benefits of On-Premises Control

Beyond economics, repatriation delivered strategic advantages:
– Data Sovereignty: Full control over sensitive geographic imagery
– Performance Predictability: Eliminated cloud provider throttling risks
– Integration Synergies: Shared infrastructure with core mapping services reduced operational complexity
– Skill Leverage: Existing systems administration expertise applied directly

Cyril notes that while cloud elasticity was lost, the workload’s maturity rendered it unnecessary. Capacity planning became straightforward, with hardware refresh cycles aligned to multi-year budgets.

Lessons for Infrastructure Strategy

Mappy’s experience yields a generalizable framework:
1. Use cloud for uncertainty: Prototyping, viral growth potential, or seasonal spikes
2. Monitor cost drivers: Storage, egress, compute hours
3. Model total cost of ownership: Include migration effort and operational overhead
4. Plan repatriation paths: Design applications with infrastructure abstraction
5. Maintain hybrid capability: Keep cloud skills current for future needs

The cloud is not a destination but a tool — powerful for certain phases, less optimal for others.

Conclusion: Right-Sizing Infrastructure for Business Reality

Mappy’s journey from cloud experimentation to on-premises efficiency demonstrates that infrastructure decisions must evolve with product maturity. The cloud enabled rapid innovation and market entry, but long-term economics favored internal hosting for stable, high-volume workloads. Cyril’s analysis provides a blueprint for technology leaders to align infrastructure with business lifecycle stages, avoiding the trap of cloud religion or on-premises dogma. The optimal stack combines both environments strategically, using each where it delivers maximum value.

Links:

PostHeaderIcon [DevoxxFR2012] Java on Amazon Web Services: Building Scalable, Resilient Applications in the Cloud

Lecturer

Carlos Conde operates as a Solutions Architect within Amazon Web Services’ European team, where he partners with enterprises to design, migrate, and optimize Java applications on the AWS platform. His technical journey began over a decade ago when he founded IWorks, a company focused on Java web development atop legacy mainframe systems, followed by co-founding Newaxe, which delivered a Java-based ERP monitoring and management platform. After years as an independent consultant helping Fortune 500 companies modernize their stacks, Carlos joined AWS to bring cloud-native principles to the broader Java community. His expertise spans the full application lifecycle—from initial architecture through production operations—with a particular emphasis on cost optimization, high availability, and security.

Abstract

Carlos Conde provides an exhaustive guide to developing, deploying, and operating Java applications on Amazon Web Services, demonstrating how the platform’s breadth of services enables developers to build systems that are simultaneously scalable, resilient, and cost-effective. He introduces AWS Elastic Beanstalk as a fully managed Platform as a Service solution that abstracts infrastructure complexity, the AWS SDK for Java for programmatic service access, and the AWS Toolkit for Eclipse for seamless IDE integration. Through detailed live demonstrations and real-world case studies from companies like Viadeo and Netflix, Conde explores deployment strategies, database patterns, content delivery, monitoring, and disaster recovery. The presentation addresses hybrid cloud scenarios, data sovereignty requirements under European regulations, and advanced cost management techniques, concluding with a vision of serverless Java and containerized workloads that redefine operational excellence.

The AWS Java Ecosystem: Tools for Every Stage of Development

Carlos Conde opens by mapping the AWS service landscape to the Java developer’s workflow. At the foundation lies Amazon EC2, offering virtual servers with pre-built Java AMIs (Amazon Machine Images) that include OpenJDK, Tomcat, and Spring Boot. For developers seeking higher abstraction, AWS Elastic Beanstalk provides a PaaS experience where applications are deployed via simple commands:

eb init -p java-8 my-java-app
eb create production-env --instance_type t3.medium
eb deploy

Behind the scenes, Beanstalk provisions EC2 instances, Elastic Load Balancers, Auto Scaling groups, and CloudWatch alarms, while allowing full customization through .ebextensions configuration files. Conde demonstrates deploying a Spring Boot application that automatically scales from 2 to 10 instances based on CPU utilization, with zero-downtime blue/green deployments.

The AWS SDK for Java serves as the programmatic bridge to over 200 AWS services. Conde writes a service that stores user profiles in Amazon DynamoDB:

AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard()
    .withRegion(Regions.EU_WEST_3)
    .build();

Map<String, AttributeValue> item = new HashMap<>();
item.put("userId", AttributeValue.builder().s(userId).build());
item.put("email", AttributeValue.builder().s(email).build());
item.put("createdAt", AttributeValue.builder().n(Long.toString(timestamp)).build());

PutItemRequest request = PutItemRequest.builder()
    .tableName("Users")
    .item(item)
    .build();
client.putItem(request);

DynamoDB’s single-digit millisecond latency and automatic scaling make it ideal for high-throughput workloads. For relational data, Amazon RDS offers managed PostgreSQL, MySQL, or Oracle with automated backups, patching, and multi-AZ replication.

Content Delivery and Global Reach

For static assets, Conde integrates Amazon S3 with CloudFront:

AmazonS3 s3 = AmazonS3ClientBuilder.standard().build();
s3.putObject(PutObjectRequest.builder()
    .bucket("my-app-assets")
    .key("css/style.css")
    .acl(ObjectCannedACL.PublicRead)
    .build(), RequestBody.fromFile(Paths.get("style.css")));

CloudFront’s 200+ edge locations cache content close to users, reducing latency from 180ms to 30ms for European customers. He demonstrates invalidating cache after deployments using the AWS CLI.

Cost Optimization Strategies

Conde presents a multi-layered approach to cost control. Reserved Instances provide up to 75% savings for predictable workloads, while Savings Plans offer flexibility across EC2, Lambda, and Fargate. For batch processing, Spot Instances deliver 90% discounts:

RunInstancesRequest request = RunInstancesRequest.builder()
    .instanceMarketOptions(InstanceMarketOptionsRequest.builder()
        .marketType(MarketType.SPOT)
        .spotOptions(SpotInstanceRequest.builder()
            .spotPrice("0.10")
            .instanceInterruptionBehavior(InstanceInterruptionBehavior.TERMINATE)
            .build())
        .build())
    .build();

He uses AWS Cost Explorer to visualize spending and set budget alerts.

High Availability and Disaster Recovery

Conde designs a multi-AZ architecture with RDS read replicas, ElastiCache for Redis caching, and S3 cross-region replication. He demonstrates failover using Route 53 health checks that automatically reroute traffic if a region fails.

Security and Compliance

Security is baked into every layer. AWS Identity and Access Management (IAM) enforces least-privilege access, while AWS KMS manages encryption keys. Conde enables S3 server-side encryption and RDS TDE (Transparent Data Encryption) with a single click.

Hybrid and Sovereign Cloud Deployments

For European data residency, Conde deploys entirely within the Paris region (eu-west-3). For hybrid scenarios, AWS Direct Connect establishes dedicated network connections to on-premises data centers, and AWS Outposts brings AWS services into private facilities.

Monitoring, Logging, and Observability

Amazon CloudWatch collects metrics, logs, and events. Conde instruments a Spring Boot application with Micrometer:

@Timed(value = "order.processing.time", description = "Time taken to process order")
public Order processOrder(OrderRequest request) {
    // Business logic
}

AWS X-Ray traces requests across services, identifying latency bottlenecks.

Real-World Case Studies

Conde shares Viadeo’s migration of their social platform to AWS, achieving 99.99% availability and reducing infrastructure costs by 60%. Netflix’s global streaming architecture leverages AWS for transcoding, personalization, and content delivery at petabyte scale.

The Future of Java on AWS

Conde previews AWS Lambda for serverless Java, AWS Fargate for containerized workloads without server management, and AWS Graviton2 processors offering 40% better price-performance for Java applications.

Implications for Java Enterprises

Carlos Conde concludes that AWS transforms Java development from infrastructure-constrained to innovation-focused. By leveraging managed services, developers build faster, operate more reliably, and scale globally—all while maintaining strict control over costs and compliance.

Links: