I wish to use the aws sdk cpp async api's for s3 in my application. However I am not able to find documentation for the same. I have been through https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/cpp/example_code/s3 but there are no examples which include async api's.
For example I am trying to use the PutObjectAsync api. According the api reference guide given here https://sdk.amazonaws.com/cpp/api/LATEST/class_aws_1_1_s3_1_1_s3_client.html#aee8d39c350c5bb66a8d1edcc18df2b78 you need to form the PutObjectRequest, PutObjectResponseReceivedHandler and AsyncCallerContext.
Here I didn't understood how to form the PutObjectResponseReceivedHandler and AsyncCallerContext. Can someone please guide me through it.
The AWS Code Sample Catalog on GitHub now includes a C++ example that demonstrates how to upload a file to Amazon S3 asynchronously.
The source code can be viewed at https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/cpp/example_code/s3/put_object_async.cpp
Related
Is it possible to copy a file from Sharepoint to s3? Preferably coding it from the AWS side.
I've searched but not seeing much out there. There's a similar title but this doesn't answer the question:
upload files from sharepoint online to aws s3 bucket
It is possible for sure. SharePoint online has a rest API I use a python package called office365, it implements a SharePoint client to handle most of the daily operations you will need.
The repo is: https://github.com/O365/python-o365
Some tips about I have struggled for the first time:
The ClientContext object requires the base site URL for the SharePoint library you want to authenticate, library doc:
https://mysharepoint.mydomain.com/sites/mysite/shareddocuments/
The URL you must pass to the Client context will be: https://mysharepoint.mydomain.com/sites/mysite
The method UserCredential requires your user in the following format: user#mydomain
With the Amazon WorkDocs API [1] I can list folders and files, create and delete folders, upload and delete files. But it seems there is no way to download a file.
The GetDocument API [2] returns a JSON document which includes a 'DownloadUrl' element but it is always 'null'. Also this 'DownloadUrl' element is not exposed in the SDK. I'm using the C++ SDK.
Is this by design?
[1] https://docs.aws.amazon.com/workdocs/latest/APIReference/Welcome.html
[2] https://docs.aws.amazon.com/workdocs/latest/APIReference/API_GetDocument.html
Here is an example of how to download a document from Amazon WorkDocs using the API. This example is implemented in Java; however, it shows you how to perform this task. As you see, an URL object plays a role in downloading the document.
https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javav2/example_code/workdocs/src/main/java/com/example/workdocs/DownloadUserDoc.java
With regards to the AWS Step Functions graph, is there a way to export/download it programmatically?
I want to automate the downloading of the image below.
I'm posting this feedback incase someone else runs into a similar issue. I decided to extract the Step Functions graph related code from the AWS Toolkit for Visual Studio Code and create a small react library to embed in a web page.
Here is the link to my library #tshepomgaga/aws-sfn-graph.
With this library in-hand, I can set up a small web app to load the AWS States Language JSON from a server and render the graph on a page.
Using a library like Puppeteer I can run a headless automation to download the graph image from the web app.
That is my solution in a nutshell but I would have preferred to call an API from AWS to download the image.
You can use AWS Toolkit for Visual Studio Code and the state machine will render right in your IDE.
State machine graph visualization
I have built a simple chatbot with Dialogflow and I have exported the json file to integrate it into alexa.
I created the skill with no problem but now I don't know how create the lambda function code for the endpoint (I create the function, but I don't know the code I have to write in).
Do you know some code for this dialogflow integration?
Many thanks
There's some great resources out there already with code to get you started. I'd recommend reading as much documentation as possible. Check out these links, the github repo has some great examples. For hosting I use the serverless framework to deploy to AWS. Highly recommend checking that out if you're a beginner to this.
https://github.com/dialogflow/dialogflow-fulfillment-nodejs
https://cloud.google.com/dialogflow/docs/quick/fulfillment
https://medium.com/faun/building-chatbot-with-google-dialogflow-with-aws-lambda-e19872e1589
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.