Serverless Developer Experience
Welcome back to AWS Comsum Quarterly (AWSCQ).
You may be wondering why a quarterly publication is back in June when the last edition was released in April. Well, friends we’ve decided to up our number of issues; We’re not sure to exactly how many a year - we just know we’ll be doing m o r e .
We realise this means we now have a not at all accurate title for our publication but we like AWSCQ so we’re sticking with it.
There’s lots going on with us here at Comsum in the coming months so stick around to the end for the latest on our upcoming events.
But for now it’s time to hand over to Principal Serverless Specialist Solutions Architect at AWS, O'Reilly Author and International Speaker; the fantastic Luca Mezzalira. Over to you Luca…
Serverless Developer Experience
Developer experience encompasses the entirety of the application development process, including the tools, workflows, and procedures involved. When working with serverless architectures, it becomes necessary to adopt a different mindset compared to traditional container or virtual machine implementations, as some operations cannot be executed locally.
A serverless developer's experience comprises various aspects, and in this context, we will focus on testing with serverless, how AI can help you in integrating with AWS services, and the tools available to expedite the feedback loop for developers.
Testing Serverless Applications
Testing is certainly one of the primary challenges encountered by developers when they start building their initial serverless workloads. It can be a struggle to navigate the testing process effectively. In serverless development, there exists a distinct approach where a portion of your testing strategy should be conducted locally, such as unit testing, while another portion should be executed in the cloud within your development environment.
Especially for integration and end-to-end testing, knowing that your IAM roles or policies are working correctly is a mandatory requirement before claiming to your colleagues: “but it was working in my machine!”
If you visit serverlessland.com, you will discover a comprehensive guide that offers brand new insights. This guide encompasses code examples for various programming languages, prescriptive guidance, and an array of resources compiled by AWS and the serverless community.
https://serverlessland.com/testing
Fast Feedback Loop
As a developer, one of my primary responsibilities was to expedite the team's feedback loop. I invested significant time in optimizing automation pipelines, developing small CLI utilities to automate common tasks, and more. In my opinion, neglecting to focus on a swift feedback loop can lead to undesirable behaviors within our teams. So, what can we do with Serverless?
To shift some of our tests to the cloud or quickly deploy code changes for Lambda functions and assess their performance in our AWS account, we need the right tools.
With AWS CDK, you can utilize the hotswap flag or the watch command to atomically update your Lambda function via the service API, bypassing a full deployment through CloudFormation.
Similarly, AWS SAM Accelerate enables updates to Lambda functions, Step Functions state machines, and more.
Lastly, I'd like to highlight SST, which has offered the live lambda feature for a couple of years. This feature allows you to test your function locally while it's being invoked remotely by AWS resources.
CDK watch and hotswap flag
SAM Accelerate
SST Live Lambda
Proximity matters
As a developer, I aim to minimize switching between multiple windows or applications to complete a task. Typically, I use Visual Studio Code with a ZSH terminal, which enables me to accomplish almost everything. The challenge arises when debugging and needing to access real-time logs from the AWS account. Fortunately, the AWS Toolkit extension allows me to fetch relevant log groups from CloudWatch directly within my preferred IDE, making it easy to identify issues. Additionally, I can conveniently visualize my Step Function state machine within the IDE to ensure my logic is sound, simply by clicking a button. The toolkit even integrates SAM Accelerate visually, making it an invaluable multi-functional tool for cloud developers.
AWS Toolkit is a fundamental plugin to accelerate the developer experience for the cloud.
AWS Toolkit for VS Code
AWS Toolkit for JetBrains
Coding with AI
In today's world, it's impossible not to mention Large Language Models (LLMs) and their potential to improve the developer experience.
One such tool, Amazon CodeWhisperer, can be installed in Visual Studio Code to expedite the integration of AWS services within your business logic, assisting in writing common capabilities and more.
For instance, I attempted to create a Lambda function that interacts with Amazon Translate, delegating the code generation of the Node.js module to CodeWhisperer while handling the exposure of necessary parameters for integrating the translate module into my code. Within a matter of seconds, my code was up and running without the need to consult API documentation – truly remarkable!
CodeWhisperer is compatible with various IDEs and offers a free tier for individual users.
Amazon CodeWhisperer
Blueprints and more
As we develop serverless workloads, we shift our focus towards infrastructure modularity rather than managing it at the code level. Frequently, we encounter common scenarios such as creating a CRUD API or integrating with an EventBridge bus. To avoid reinventing the wheel and consistently apply corporate-level technical guardrails, we can utilize a catalog of blueprints accessible throughout the organization. Tools like Backstage or Proton enable us to maintain a single source of truth for all developers, where each blueprint incorporates the necessary best practices for quickly launching a new serverless microservice.
AWS Proton
Backstage
And that’s a wrap from Luca!
A huge thanks to him from all of us at Comsum. Your time and expertise is massively appreciated!
Now we’ve a few words from a couple of our sponsors who’ll be joining us at next week’s Community Network Evening straight after the AWS Summit.
Contino and Steamhaus are both a real pleasure to work with so if you’re heading to the summit please go and say hi at stand G19 & B16 respectively.
Contino is a Gold Sponsors of AWS Summit London, alongside Cognizant and Inawisdom. Join us there on June 7th and stop by stand G19 to say hello, play Pac-Man and get the chance to win some signed F1 goodies.
Want to learn more about what we do? Come listen to one of our talks at the Athena Partner Theatre @ 15:50 - with the CTO of Coventry Building Society regarding how to succeed in implementing a large scale AWS migration from on-prem to the cloud."
Steamhaus are delighted to be sponsoring the AWS Summit and the amazing Comsum Networking Evening. If you’re interested in AWS driven application modernisation (serverless, containers, AI/ML, Data & Analytics) come and see us at stand B16.
Also, sign up for our upcoming webinar with AWS on 29th June:
Application Modernization: Accelerating your Modernization Journey
Looking further ahead you can still get early bird tickets for our Annual AWS Community Summit in Manchester this September. Grab one now!
And that’s all folks!
We’ll be back with another issue and Guest editor in the coming weeks.
Before you go be sure to give our sponsors a click. AWSCQ, our live and digital events are all made possible by their support.