For example, if one function is tagged with STAGE=dev and another is tagged with stage=DEV, both will show if you filter by either combination. In the Lambda console, case doesn’t have any effect on tags. Below are the few that apply more directly to Lambda functions as well as a few practices I recommend.Īlways use a standardized, case-sensitive format for tags, and implement it consistently across all resource types.īeing consistent is important (especially with case) as this affects how you can query tagged resources. According to the documentation, tags are a “map of string to string” when applied to Lambda functions:ĪWS outlines a number of best practices for tagging strategies in the guide I mentioned earlier. SAM templates are relatively straightforward if you have some experience with CloudFormation. There are other solutions, but we’ll focus on these two for now. The two most popular solutions for managing Lambda deployments are the Serverless Framework and Amazon’s own Serverless Application Model (SAM). But in reality, we are most likely going to want to automate these and not apply them manually on every deployment.
Tag editor aws how to#
AWS has a guide that explains how to add tags using the AWS Console or the CLI. Lambda functions, like other AWS resources, allow tags to add metadata to our infrastructure. Even if your organization doesn’t maintain strict resource tagging standards, it’s certainly good practice for developers to adopt as they build out their serverless applications. This has a number of benefits, but at the same time requires more discipline across the organization to maintain security and other operational standards. As the underlying hardware is abstracted away, much of the provisioning of resources now falls on the developer. But while some organizations may have made tagging a central part of their AWS infrastructure, serverless applications present new challenges for operation teams.Ī core tenet of serverless is to embrace infrastructure as code. AWS has a really good guide that outlines some tagging strategies as well as gives some examples of the types of tags that can be used. Tagging AWS resources is not new, in fact, it has been quite a staple in many organizations for everything from automation, to security, to cost tracking and more. What’s different about tagging serverless resources? ? This not only give us more insight into our applications, but can be used to apply Cost-Allocation Tags to our billing reports as well. ? In this post we’ll look at how we can use AWS’s resource tagging as a way to apply structure to our deployed functions.
Tag editor aws code#
Regardless of how code is organized locally, much of that is lost when all your functions end up in a big long list in the AWS Lambda console. Or you might simply put all your functions in a single repository for better common library sharing. You may have several functions and resources as part of a microservice contained in their own git repo. Some best practices are starting to emerge, but many development teams are simply mixing their existing workflows with frameworks like Serverless and AWS SAM to build, test and deploy their serverless applications.īeyond workflows, another challenge serverless developers encounter as their applications expand, is simply trying to keep all of their functions organized. It’s no secret that serverless development workflows have been a challenge for a lot of organizations. As our serverless applications start to grow in complexity and scope, we often find ourselves publishing dozens if not hundreds of functions to handle our expanding workloads.