Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhausenblas/arn.services
Utility service for Amazon Resource Names (ARNs)
https://github.com/mhausenblas/arn.services
arn aws service
Last synced: about 1 month ago
JSON representation
Utility service for Amazon Resource Names (ARNs)
- Host: GitHub
- URL: https://github.com/mhausenblas/arn.services
- Owner: mhausenblas
- License: apache-2.0
- Created: 2020-01-10T15:57:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-16T11:00:06.000Z (almost 5 years ago)
- Last Synced: 2023-03-11T18:48:15.343Z (almost 2 years ago)
- Topics: arn, aws, service
- Language: Go
- Size: 20.5 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# arn.services
A utility service for Amazon Resource Names ([ARNs](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)), providing the functionality
as listed below. You can consume it as an online service via `https://arn.services` or run it yourself as a
[SAM application](https://aws.amazon.com/serverless/sam/), see details below in the [run it yourself](#run-it-yourself) section.## Use it
ARN Services has two features: you can [break up an ARN into its components](#compartmentalize)
and you can [generate an ARN from its components](#generate). There are at the moment no
semantic checks done, however for the `generate/` endpoint some defaulting is provided.### Compartmentalize
In order to break up an ARN into its components (or: compartmentalize), use an
HTTP `GET` on `explode/$ARN`, for example:```sh
$ curl -s https://arn.services/explode/arn:aws:s3:us-west-2::abucket | jq .
{
"Partition": "aws",
"Service": "s3",
"Region": "us-west-2",
"AccountID": "",
"Resource": "abucket"
}
```### Generate
To generate a fully qualified ARN from (certain) components, use an HTTP `POST`
to `generate/`, for example:```sh
$ curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"Service":"s3", "Resource":"somebucket/someobject"}' \
https://arn.services/generate
arn:aws:s3:us-west-2::somebucket/someobject
```## Run it yourself
If you want to run ARN services yourself, you need to:
1. clone this repo (using `git clone https://github.com/mhausenblas/arn.services.git` for example)
1. create an S3 bucket for the Lambda functions and change the value of `ARNS_BUCKET` to your own S3 bucket in the [Makefile](https://github.com/mhausenblas/arn.services/blob/master/Makefile)
1. execute `make deploy`
1. OPTIONALLY: set up [API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)
and Route 53 for a custom domain and run `make up ARNS_ACM_CERT=$ARNS_ACM_CERT` with the ARN of the ACM cert (I did email validate for my Namecheap domain).