mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
more AWS notes
This commit is contained in:
@@ -1,12 +1,31 @@
|
|||||||
|
|
||||||
|
## How To Use
|
||||||
|
|
||||||
|
`python create_lambda_function.py MY_REGION MY_BUCKET_NAME`
|
||||||
|
|
||||||
|
Upload the resulting `lambda_function.zip` using the Lambda console.
|
||||||
|
|
||||||
|
## Restrictions
|
||||||
|
|
||||||
|
1. There is a limit of 1 MB for tiles served through Lambda@Edge.
|
||||||
|
2. Lambda@Edge does not support layers, environment variables, or ARM functions.
|
||||||
|
|
||||||
|
## AWS Notes
|
||||||
|
|
||||||
|
1. API Gateway (Event format v2.0)
|
||||||
|
2. Lambda Function URLs are not recommended.
|
||||||
|
|
||||||
## Test Event
|
## Test Event
|
||||||
|
|
||||||
|
CloudFront event:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Records": [
|
"Records": [
|
||||||
{
|
{
|
||||||
"cf": {
|
"cf": {
|
||||||
"request": {
|
"request": {
|
||||||
"uri": "/tiles/0/0/0.pbf",
|
"uri": "/my-tileset-name/0/0/0.pbf",
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"headers": {}
|
"headers": {}
|
||||||
}
|
}
|
||||||
@@ -14,4 +33,12 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
API Gateway V2 / Lambda Function URLs:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"rawPath": "/my-tileset-name/0/0/0.pbf"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
Binary file not shown.
Reference in New Issue
Block a user