Please help to create regx to extract region from below aws ARN(us-west-2)
arn:aws:secretsmanager:us-west-2:1111111111:secret:/rds-oracle/xxxx-xx17sd-xxxxxx-xxx67xxx7gd7133/TEST-01TEST
Hi
...
| rex "^(?:\w+:){3}(?<region>[^:]+)"
this should do the extraction. If the ARN is on field, then you should add “field=<field name>” in rex.
r. Ismo
Thank you , its working
Hi
...
| rex "^(?:\w+:){3}(?<region>[^:]+)"
this should do the extraction. If the ARN is on field, then you should add “field=<field name>” in rex.
r. Ismo
Can you help to brekdown, in case i want to modify to pull different field
Here is a link https://regex101.com/r/GVLrA1/1 where you could read what those are meaning. There is also easy to chain it.