What is Amazon Flourish (for AWS)

According to a recent article on the New Stack Blog, the Amazon Serverless Team (responsible for instance for Amazon Lambda) is about to release a new open source product called ‘Floruish’.

Currently, there are very few details available on this product. These are some points I could find:

  • It will be a platform to manage components of serverless applications.
  • This includes versioning lambda functions and packaging lambda functions with other components such as database dependencies.
  • It will be open source (under Apache license)

As more details become available, I will update this post.

For now, here are some related resources regarding serverless applications with Amazon:

Bulk Change ACL for Amazon S3

Using bucket policies, it is easy to set ACL settings for all new objects that are uploaded to Amazon S3.

However, I wanted to remove ‘public’ read rights for a whole bunch of objects at the same time and such policies do not apply to objects that are already stored on S3.

I found an easy way to change the ACL settings for many objects at the same time. To bulk change, ACL, do the following:

  • Download the free tool CloudBerry Explorer for Amazon S3
  • Install it
  • In the AWS management console, go to Security Credentials
  • Create a new user ‘s3-super’. Save the access and secret key.
  • Assign the role  ‘AmazonS3FullAccess’ to the user

full_access

  • Start CloudBerry Explorer and connect to your S3 with the access and secret key of the s3-super user
  • Now in this tool navigate to the bucket with the objects you would like to change
  • Select one or more objects for which you want to change the ACL settings in the left-hand column.
  • Click on the button ACL Settings

acl

  • In the dialog that pops up, change the settings to what you like and click OK.

acl_settings

The ACL settings for your objects should now be changed.

 

 

JQuery UI Droppable: Prevent Event Bubbling

JQuery UI Droppable is a great framework for implementing drag and drop features in a web application.

Here I will show two ways how it can be prevented that multiple droppable elements on the same page can receive the same drop events.

If the one droppable is the parent of the other:

In this case, it is sufficient to add the property greedy: true. Easy.

If there is no parent-child relationship between the elements:

This is a bit tricky, since setting the greedy property will only prevent events bubbling up to the parent. If the two elements are independent (but somehow one floats on top of the other), we need to add some extra code to the drop handlers for both elements:

elem.droppable({
 ...
 drop: function( event, ui ) {

   var elementAtPoint = document.elementFromPoint(event.pageX-1, event.pageY-1);
 
   if (!$.contains(elem[0], elementAtPoint)) {
     // not really meant for this element
     return;
   }

   // handle drop for this element

 }
 ...
});

Replace elem with the two respective elements that are droppable.

This code will assure that the event will only be triggered on the element that is visible for the user.