Closed Bug 1298349 Opened 9 years ago Closed 9 years ago

Configure amo2kinto-lambda blocked page generator and serve s3 bucket pages.

Categories

(Cloud Services :: Operations: Deployment Requests - DEPRECATED, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rhubscher, Assigned: jason)

Details

amo2kinto 1.5.0 have been released with a blocklist description pages generator. https://github.com/mozilla-services/amo2kinto-lambda/releases/tag/1.5.0 The according lambda endpoint have been created: https://github.com/mozilla-services/amo2kinto-lambda/blob/master/lambda.py#L59 You can configure with its name `lambda.blockpages_generator` Event parameters are: - server: The kinto server to read data from. (i.e: https://kinto.stage/) - aws_region: The S3 bucket region. e.g eu-central-1 - bucket_name: The S3 bucket name. e.g amo-blocked-pages - bucket: The readonly public and signed bucket. e.g blocklists - addons-collection: The add-ons collection name. e.g addons - plugins-collection: The plugin collection name. e.g plugins i.e: { "server": "https://kinto.stage.mozaws.net/v1", "aws_region": "eu-central-1", "bucket_name": "amo-blocked-pages" } }
This has been deployed to stage at https://blocked.stage.mozaws.net. The Content-Type of the html objects are currently being set to 'binary/octet-stream'. This is unusual since S3 should be able to infer the type based on extension. Either way I think we need to explicitly set the Content-Type of these objects to 'text/html'. https://github.com/mozilla-services/svcops/pull/1218
I manually changed the metadata on the object to 'text/html' for testing purposes https://blocked.stage.mozaws.net/i100.html
Ok so I guess there is something to fix in my sync_file_to_s3 function to set the correct mimetype. I will upgrade the lambda script.
I have updated the lambda.zip file, can you try it there? https://github.com/mozilla-services/amo2kinto-lambda/releases/tag/1.4.1-2
Hey Jason, do you think it would be possible to make https://blocked.stage.mozaws.net/ to open https://blocked.stage.mozaws.net/index.html too?
Thanks, I've updated the lambda function and the mimetype is now set correctly. I've also updated the CDN configuration to set a root document for https://blocked.stage.mozaws.net. Please test and let me know if it looks good.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
It seems to work ! Great !
Did we deploy this to prod already?
Yes it was deployed to prod as part of the phase 1 migration.
Are Firefox users already redirected to it?
Awesome thanks!
You need to log in before you can comment on or make changes to this bug.