FHIR Chat · IG publishing on AWS S3? · IG creation

Stream: IG creation

Topic: IG publishing on AWS S3?


view this post on Zulip Bob Milius (Mar 24 2020 at 20:53):

Has anyone published their IG to an AWS S3 bucket? I can get the content there, but it's ignoring the css so the result is pretty ugly. Any advice is welcome.

view this post on Zulip David Johnson (Mar 24 2020 at 20:54):

I assume you're serving the S3 bucket as a website. Is there a URL I can look at?

view this post on Zulip David Johnson (Mar 24 2020 at 20:54):

I also assume you've made the objects in the bucket public, including the css folders/files

view this post on Zulip Bob Milius (Mar 24 2020 at 21:05):

https://fhir.b12x.org/ig/hla-reporting/index.html
I think I've made everything public (I'm new to AWS S3). I uploaded the unzip contents of the full-ig.zip file created by the igpublisher. It looks as expected when I view it locally.

view this post on Zulip Vassil Peytchev (Mar 24 2020 at 21:08):

Hit F12 in Chrome or Firefox to see the error messages. Somehow the MIME type associated with the style sheets is application/xml...

view this post on Zulip David Johnson (Mar 24 2020 at 21:10):

I'm getting an access denied on this file: https://fhir.b12x.org/ig/hla-reporting/assets/css/bootstrap.css

view this post on Zulip David Johnson (Mar 24 2020 at 21:10):

I'd make public from the hla-reporting folder level

view this post on Zulip David Johnson (Mar 24 2020 at 21:12):

I think the resultant error type is application.xml but ultimately the file cannot be accessed.

view this post on Zulip Jean Duteau (Mar 24 2020 at 21:12):

I get a 403 access denied on all of the files in the assets directory (css and js)

view this post on Zulip Jean Duteau (Mar 24 2020 at 21:13):

and I'm glad Bob is doing this because that is the next thing I need to do for my project - upload my IG to an AWS S3 bucket. Good to know at least one of the pitfalls! :)

view this post on Zulip Bob Milius (Mar 24 2020 at 21:17):

I did 'make public' on hla-reporting folder. Same result.
btw, there are only files in hla-reporting, no directories. There's no hla-reporting/assets/css/
Like I mentioned, all I did was unzip the contents of full-ig.zip and cp them over.
I probably need to learn more about css :/

view this post on Zulip Vassil Peytchev (Mar 24 2020 at 21:20):

When you unzip full-ig.zip locally, don't you have subfolders?

view this post on Zulip David Johnson (Mar 24 2020 at 21:22):

You may want to individually create the folders and drop the files in

view this post on Zulip David Johnson (Mar 24 2020 at 21:22):

there aren't that many, it will take a little bit, but you need those all in the bucket.

view this post on Zulip Bob Milius (Mar 24 2020 at 21:29):

Vassil Peytchev said:

When you unzip full-ig.zip locally, don't you have subfolders?

No, I don't have subfolders.
I just uploaded the entire contents of my output folder which does have the assets folder, and it appears to be displaying correctly now.
thanks for the hints!

view this post on Zulip Bob Milius (Mar 24 2020 at 21:37):

okay, better, but still some issues. e.g. differential and snapshot on the same page. e.g.
https://fhir.b12x.org/ig/hla-reporting/StructureDefinition-hla-genotype.html
When I view it locally, either opening the file directly, or serving it in a localhost server (python -m SimpleHTTPServer 8000), then it looks as expected with views in different tabs

view this post on Zulip Grahame Grieve (Mar 24 2020 at 22:15):

s3 doesn't support redirects. It's really a pretty limited web server; I strongly advise against using s3

view this post on Zulip Bob Milius (Mar 25 2020 at 14:17):

Thanks @Grahame Grieve. Can you recommend a platform to host an organization specific IG? AWS or ...?

view this post on Zulip Jens Villadsen (Mar 25 2020 at 14:19):

I don't have problems with AWS - if I had, https://docs.ehealth.sundhed.dk/latest/ig/index.html would look like crap

view this post on Zulip Bob Milius (Mar 25 2020 at 14:19):

@Jens Villadsen Are you using an S3 bucket?

view this post on Zulip Jens Villadsen (Mar 25 2020 at 14:21):

I'm pretty sure thats S3

view this post on Zulip Jens Villadsen (Mar 25 2020 at 14:21):

image.png

view this post on Zulip Bob Milius (Mar 25 2020 at 16:03):

@Jens Villadsen what tool are you using to display that info?

view this post on Zulip Jens Villadsen (Mar 25 2020 at 16:07):

Chrome

view this post on Zulip Jens Villadsen (Mar 25 2020 at 16:07):

Press F12

view this post on Zulip Bob Milius (Mar 25 2020 at 17:53):

Looks like my rendering issues are related to security policies that prohibit inline scripts.

view this post on Zulip Grahame Grieve (Mar 25 2020 at 19:55):

that sounds like an IG publisher issue? what are you trying to do

view this post on Zulip Bob Milius (Mar 25 2020 at 20:31):

I'm just posting the IG to a AWS S3 bucket. Looks okay when I go directly to the aws url, e.g.,
http://fhir.b12x.org.s3-website-us-east-1.amazonaws.com/ig/hla-reporting/StructureDefinition-hla-genotype.html
but not when I go to
https://fhir.b12x.org/ig/hla-reporting/StructureDefinition-hla-genotype.html
which I understand goes thru cloudfront first before going to the first url.

I'm getting console errors (seen in dev mode in chrome) which I gather are related to our org security policy settings, eg.,

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('######'), or a nonce ('nonce-...') is required to enable inline execution.

btw, this is a POC IG to see if I can create an IG with sushi and publish the IG on AWS S3.

view this post on Zulip Grahame Grieve (Mar 25 2020 at 20:39):

I haven't seen this error but this is not from the IG publisher. But why is S3 a goal?

view this post on Zulip Bob Milius (Mar 25 2020 at 20:51):

It's what our org has already setup for building quick websites. It probably won't be a long-term solution for our FHIR work.

view this post on Zulip David Johnson (Mar 25 2020 at 21:40):

Honestly, if you're ready to use an s3 bucket, with the limited requirements for content size, I would use a free t2.micro instance running windows IIS. I say this because while S3 is great for hosting simple websites where simple content is delivered, it has no place for mime-types, redirects or special settings.

view this post on Zulip David Johnson (Mar 25 2020 at 21:41):

The t2.micro instance is free and IIS is easily installed. I don't mean this as an official endorsement, just an understanding of why you would want to steer clear of an S3 bucket as a solution for publishing any content that requires additional configuration beyond what's done at the browser.

view this post on Zulip David Johnson (Mar 25 2020 at 21:43):

Of course, once you're on the t2.micro EC2 instance, there will be some challenges there. But at least you have the flexibility that you would not have in an S3 bucket.

view this post on Zulip Bob Milius (Mar 25 2020 at 22:15):

Thanks! I’ll contact our IT systems guy.


Last updated: Apr 12 2022 at 19:14 UTC