Comments (10)
Do you have a preference as to where to retrieve the HTTP Source Host string from...? (e.g. - SAM template or Environment)
If the HTTP source is a deploy-time configuration option, it should go in the SAM template. Then SAM can write it to the IIIF function's environment when it's deployed.
I have been evaluating https://github.com/hMatoba/piexifjs... but was wondering if there was a preference?
We have struggled with various tools for reading EXIF data from images in lambdas. The best we've found so far is pretty cumbersome – a full installation of exiftool in a lambda layer which we call out to from nodejs in a subprocess.
That said, if it's just dimension info you're looking for, the existing probe-image-size
package does exactly that, over HTTP. In fact, the default implementation uses a signed URL to allow it to access S3 objects over HTTPS.
from serverless-iiif.
What process are you using to spin it up? It looks like you might have a node_modules
directory under build
that is built for the wrong architecture, so npm
thinks sharp is already installed when it actually needs to be rebuilt for linux x64. But without seeing the steps involved, I can't be sure.
from serverless-iiif.
@mbklein - thank you!
I made the following edits as a first run of http source support from a forked version of this repo:
Also pointed the src
and dependency
directories to zip files that were uploaded to S3.... due to errors being generated from the relative path
Lastly, used the standalone template
, edited in the first commit in CloudFormation with all of the necessary params.
Thanks in Advance,
Brian
from serverless-iiif.
Are you trying to publish this to SAR and deploy from there? Or deploying using the command line instructions?
To be honest, I'm not completely familiar with how the command line deploy script works since @orangewolf's edits. I'd recommend reverting codeclout@fd9e580, then running the following from the sam/standalone
directory:
$ rm -rf .aws-sam # to remove any existing build artifacts
$ sam build --use-container
$ sam validate
$ sam deploy --guided
When it prompts you for the SharpLayer
variable, leave it blank (default) so it'll use the JP2-compatible layer. What region are you deploying in? I'll make sure there's a JP2 layer for that region. (There should be – I think I deployed it to all the North American regions.)
from serverless-iiif.
@mbklein - Thanks again!
I was trying to deploy from S3... ultimately, if this POC is approved to move out of the sandbox we will need to automate the deployment... although I haven't given a ton of thought to that just yet. Publishing to SAR sounds like a good option. I have an ec2 with permissions to talk to all the things
so I'll give the command line build with your recommendations a go.
We are in us-east-1 (GovCloud).
Thanks again for all of your help... highly appreciated!
from serverless-iiif.
I would recommend against publishing to SAR – it sounds like an extra step that won't be necessary for your use case. Depending on what you use for CI, automated deployments via the sam
CLI can be pretty straightforward.
I don't think I have the jp2 sharp layer deployed to any of the govcloud regions but I can look into it. There's a good chance I don't have access to them, though.
from serverless-iiif.
Would a pull request allowing for the override of the code source via the SAM template be considered? It is a change our broader team needs, but would like to keep the ability to upgrade from SAR.
from serverless-iiif.
I'd take a look at a PR for overriding the code source as long as the default behavior didn't change, and if it had some good documentation to go with it.
from serverless-iiif.
@mbklein - I have been periodically working on a pull request that will address not only the code source location of the SAM template, but also HTTP as an alternative data source. I wanted to bring back a couple of decisions for which you may have a preference.
- Do you have a preference as to where to retrieve the HTTP Source Host string from...? (e.g. - SAM template or Environment)
I was also evaluating EXIF processor modules from NPM that would allow for retrieving dimension metadata from the data returned from the HTTP Source.
- I have been evaluating https://github.com/hMatoba/piexifjs... but was wondering if there was a preference?
Thanks in Advance,
Brian
from serverless-iiif.
@mbklein - thank you
We moved the HTTP source implementation to Lambda@Edge and for the interest of time, being that the source does not return the image dimensions, have opted to accept the logged warning for image dimensions.
from serverless-iiif.
Related Issues (20)
- Project Branding
- Look into Lambda Streaming Response to replace 6MB workaround HOT 3
- CloudFront cache key should include Origin header when using REFLECT_ORIGIN HOT 1
- CloudFront caching interfering with CORS responses HOT 1
- Error: VipsJpeg: Bogus JPEG colorspace HOT 2
- Question -- upgrade path HOT 5
- unable to deploy standalone version HOT 4
- problems on 4.3.2 that were not on 4.2.0, maybe with image dimensions? HOT 5
- image dimension errors HOT 4
- Which viewers work best with serverless-iiif? HOT 3
- Image contains errors HOT 5
- Error: Input image exceeds pixel limit HOT 5
- Add S3 metadata info to docs
- Extract region and OpenSeaDragon error HOT 9
- can one define a custom host name in place of the Lambda host name HOT 2
- Remove `sizes` property from `info.json`? HOT 1
- Support for nodejs20 runtime
- Fix response limit docs
- Using Serverless IIIF with Cloudfront and Origin Access Control HOT 2
- Mostly jp2 images are not opening it is working in cantaloupe.Attaching error screenshot HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-iiif.