h& Z i.      !"#$%&'()*+,-(C) 2020-2022 Bellroy Pty Ltd BSD-3-Clause'Bellroy Tech Team  experimental Safe-InferredN  8(C) 2020-2022 Bellroy Pty Ltd BSD-3-Clause'Bellroy Tech Team  experimental Safe-Inferred !4789:< aws-arnA parsed ARN. Either use the   , or the  and  functions to convert . <->  . The  part of an ARN will often contain colon- or slash-separated parts which precisely identify some resource. If there is no service-specific module (see below), the  and * lenses in this module can pick apart the  field.4If you want lenses into individual fields, use the  0https://hackage.haskell.org/package/generic-lens generic-lens or  2https://hackage.haskell.org/package/generic-opticsgeneric-optics libraries.Service-Specific Modules Modules like Network.AWS.ARN.Lambda provide types to parse the resource part of an ARN into something more specific: -- Remark: Lambda._Function :: Prism' Text Lambda.Function -- Returns: Just "the-coolest-function-ever" let functionARN = "arn:aws:lambda:us-east-1:123456789012:function:the-coolest-function-ever:Alias" in functionARN ^? _ARN . #resource . Lambda._Function . #name You can also use  's / instance and  to create (s that indicate their resource type in  's type variable:  . " Lambda._Function :: Prism' Text (  Lambda.Function) aws-arnaws-arnaws-arnaws-arnSplit a . into colon-separated parts.7This is useful for editing the resource part of an ARN:'"foo:bar:baz" & colons . ix 1 .~ "quux""foo:quux:baz"Writing back through the lens ignores the string it is applied to:/"Hello, world!" & colons .~ "dude" :| ["sweet"] "dude:sweet"aws-arnSplit a . into slash-separated parts."foo/bar/baz" ^. slashes"foo" :| ["bar","baz"]Similar caveats to  apply.  (C) 2020-2022 Bellroy Pty Ltd BSD-3-Clause'Bellroy Tech Team  experimental Safe-Inferred!:< V"aws-arnAn AWS Lambda function name, and optional alias/version qualifier.""function:helloworld" ^? _Function:Just (Function {name = "helloworld", qualifier = Nothing})*"function:helloworld:$LATEST" ^? _FunctionJust (Function {name = "helloworld", qualifier = Just "$LATEST"})%"function:helloworld:42" ^? _Function