How to incorporate AWS S3 plugin into Grails app? - amazon-web-services

How do I go about integrating this S3 plugin into my grails application? The documentation is very limited.
I have it fully installed with Quartz. And I have my AWS account, policies and bucket setup.
I want to be able to upload content for my Event domain class, with the content being uploaded being exclusive for each event object.
Thank you.

The plugin you linked to looks very outdated, Last updated: 24 March 2010 and seems odd to depend on another plugin like quartz to use s3.
I would instead suggest Karman (maintained by the same person as asset-pipeline) and updated for Grails 2 & 3 https://grails.org/plugin/karman-aws?skipRedirect=true
Or you may just use the aws java sdk directly - it is straight forward api: http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpJava.html

This plugin is out of date.
I think it will be better to use https://grails.org/plugin/aws-sdk. This plugin supports S3 integration. You can find docs on github.

Related

Using SES java sdk in spring boot (gradle) project

I am trying to use AWS SES in my spring boot project.
I found the Java SDK package name, and below is my code for it.
(I am already using S3, just trying to add SES.)
compile('com.amazonaws:aws-java-sdk-core:1.11.901')
compile('com.amazonaws:aws-java-sdk-ses:1.11.901')
compile('com.amazonaws:aws-java-sdk-s3:1.11.901')
And below is my external library list about aws sdk.
I was expecting to see com.amazonaws:aws-java-sdk-ses:1.11.901, but instead I am seeing
com.amazonaws.aws-java-sdk-kms:1.11.901.
The versions of all the Amazon java sdks added to my project is the same, 1.11.901.
Any suggestions about why this is happening??
I strongly recommend that you port your code to version 2 of the AWS SDK for Java. For V2 and Gradle, see this doc for more information: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/setup-project-gradle.html

Does the Unity AWS Sdk support standalone or only mobile?

I am looking for a Backend-as-a-Service provider for my standalone game. The AWS Unity Sdk looks very interesting, but it is labeled as "AWS Mobile Sdk." Does this mean that only mobile platforms are supported, or am I missing something?
Any guidance will be greatly appreciated.
Standalone is supported by AWSSDK.
If you search Unity and AWS, most of the information is concerning with the mobile SDK, part of the function like CognitoID is available, but there is special consideration supporting Unity as you can only import DLLs to acess AWSSDK rather than the NugetForUnity. Here is the official document guiding you downloading the DLLs.
And here is my repository which is a demo of Unity directory uploading implemented with AWSS3 bucket.
Thank you for your question.

updating an S3 website with zero downtime

What would be the best approach to update a static website hosted on an S3 bucket such that there is no downtime. The updates will be done by marketing teams of a company with zero knowledge of cli commands or how to move around in the console. Are there ways to achieve this without having to learn to move around in the console?
Edit
The web site is a collection of static html pages and will be updated using an Html editor. Once edited the marketing team will upload each individual updated file to the S3 bucket. There are no more than 10 such files including html and images. This was currently being hosted on a shared server and we now want to move it to an S3 bucket capable of hosting simple web pages. The preference is to not provision console access for certain users as they are comfortable only using a WYSIWYG html editor and uploading using an FTP client. The editors don't know html and the site doesn't use javascript. I am thinking of writing a batch script to manage the uploads to keep all that cli complexity away so they only work on the HTML in the editor. Looking for the simplest approach to achieve this.
You can set up a CI/CD pipeline as mentioned here
Update static website in an automated way
The above pipeline generally has a code commit as trigger. It depends what your marketing teams are doing on the content and how they are updating it. If they are updating the content that is hosted on AWS, you can change the trigger to S3 updates. The solution depends on an individual use case, which may require some dev from your side to make it simpler for your marketing teams.
I'm unsure what you are asking here, because to "update" a static website, surely you must have some technical knowledge in the very basics of web development.
It's important here to define what exactly you mean by update, because again, updating a website and updating a bucket are two completely different things.
Also, S3 has eventual consistency with PUT's (updating) so there will be some minimal downtime.
The easiest way to update an S3 bucket is via the console, and not the CLI. The console is pretty user friendly, and shouldn't take long to get used to.

How do you sync Postman with a git repository

I'm wondering how you can sync your Postman config with a git repository.
I know you can export and import from Postman to a folder - which is OK - but I wondered if there was something more effortless.
I'm not exactly sure how you're trying to use this, but a few options would be:
First Option
to use their addon cli called newman. You can run collections from a URL or Local file with newman using
newman run http://some.url.here
Then if you make the remote url a part of a git repository it would obviously update/change with each commit/pull
Second Option
Try this with extreme caution and only if you feel comfortable with the process, also this may not be compliant with their terms of use so I don't suggest you try it without first some research
If you can find the directory in which the Postman collections are held, you could create a hard link with the command line from a git repository on your machine to the directory or specific file you need to link. Whenever you change the source file the one in the Postman config will change.
The way in which you accomplish this will depend on the system you use and version of Postman.
In addition to exporting and cloud syncing as mentioned in the other answers, there's some other options too.
Postman added a Git sync in Postman app v9 so you can manage version control with forking, merging, and pull requests.
There are also built-in integrations to sync your Postman collections with GitHub, with GitLab, and other services for version control. These integrations are for users on the paid plans.
Postman also has an API so you can GET and run the latest version of your collection, environment, or whatever using Newman or continuous integration tools or to build your own integration.
Postman is not designed for that case. They offer a cloud service which keeps you and your collaborators in sync. You can try their cloud plan for 30 days for free. Check here: https://www.getpostman.com/cloud_trial_faq
You can use Postman integrations (Home > Integrations) to link Postman to your remote git repository.
The following article explains how to integrate your gitlab repo to Postman:
https://learning.postman.com/docs/integrations/available-integrations/gitlab/
Also you can use Postman API versionning to do something similar:
https://learning.postman.com/docs/designing-and-developing-your-api/versioning-an-api/
For non-free plans, Postman now (version 9 and up) supports automatic sync of collections with a git repository on several popular git services.
(Again, it's currently only available for paid plans)
See the documentation for how to integrate Postman with GitHub, GitLab and Bitbucket.
The process is roughly:
create a dedicated repo on your git provider (e.g. my-postman-collections-repo)
create a personal access token for the provider (e.g. GitHub) with the expected scope (e.g. repo and user)
define an integration (using postman UI) for each collection you want to be kept in sync
I'm working with the GitHub integration and it works great.

How to create a Module for AWS SDK

I am trying to develop a custom module for AWS-IOT, Here i got module to access AWS services but the existing module is not supported for AWS-IOT which is the new service launched by Amazon.
I have downloaded the AWS-SDK but here i am unable to find .m files.
Please let me know if you need more info.
Thanks, Rakesh Kalwa.
If AWS marketplace modules is not working then you maybe try another open source module ti.aws. please check that.
And if still not working then you can also create your new module based on AWS SDK. for modules development help Please visit Extending Titanium Mobile.