Programmatically initiate Event hub failover - azure-eventhub

Answer for this SO-post says event hub REST end points can be used to initiate the fail over, but I don't find any Microsoft docs about event hub REST end points.
Could you please share how to do it?

First, read this doc Azure Event Hubs - Geo-disaster recovery for the concept if you need it.
For rest api, please refer to this official doc: Disaster Recovery Configs.
For java, you can refer to this sample in github: eventhub-java-manage-event-hub-geo-disaster-recovery.
For .net, you can refer to this sample in github: Microsoft Azure Event Hubs Geo-DR.

Related

I'm not seeing "Publish" button in Amazon Lex Bot and all the tutorials' screenshots I'm finding don't align with my AWS Consoles

Hello Stackoverflow Friends:
Context:
My goal is to use Amazon Lex Bot to communicate via an SMS text channel using an Amazon Pinpoint phone number associated with my account. Users will send utterances via their native text client, i.e. the Messages application on their iPhone. It would reply to them in the same channel.
I did also want to include a 'middleware' layer of having a Lambda functions extract certain user utterances and or the user's phone number and store that in a Dynamo DB.
Problem(s):
I found this tutorial and I am blocked [Blockers listed below].
There seems to be a disconnect between what I'm seeing in my AWS console and this tutorial (and documentation on AWS) as well as many video tutorials I'm seeing on YouTube - or I'm maybe doing something wrong?
Version 2? I did observe that my AWS Lex console that the URL that includes a "V2" in the url ("https://console.aws.amazon.com/lexv2/home?region=us-east-1#bots") I am not observing that "V2" in various instructors' videos that I've watched. Which leads me to wonder if perhaps V2 is a new version of Lex and the documentation hasn't been released? Here is a link to a video done by one of the author's of the above linked tutorial and as you can see from the screenshot in his video it isn't /lexv2/ it is just /lex/.
Screenshot from instructional video:
Screenshot from my AWS console:
Blockers / Questions:
1. [Tutorial says]1 (in Step 1; Request a long code for your country. When I do that - there is no focus / SMS capability is grayed out indicating [to me anyway] that the outcome / goal of this tutorial is not possible using a long code?
Question: As a workaround I selected a toll free number which had SMS capabilities. Is that permissible?
2. In Step 2; the tutorial says, Use the default IAM role - there is no default, I selected.
Question: Is that a good path forward?
3. Also in Step 2; [the tutorial says]1, When the bot finishes building, choose Publish. For Create an alias, enter Latest. Choose Publish. - I see no "Publish" button and this is highly confusing as in many, many, many tutorials I've watched on YouTube the instructors have that button visible.
Here is my screenshot of what I see [no "Publish" button]:
Here is Amazon document tutorial with a "Publish" button.
And here is a various tutorial I see online with a "Publish" button.
Question: Did I miss a step (I did build it and test it and those controls to do that were on the bottom of the UI not on the top as all the tutorials I've found are. Is it possibly V2 of this Lex bot that has changed?
Assuming I can get past these blockers - in Step 3 of the tutorial it says, Under Execution role, choose View the LexPinpointIntegrationDemoLambda role.
Question: Not to be really dense but I have swirl on how to do that / where to do that. Can I get some direction / steps on exact steps to do that please?
Yes, the problem is that the tutorial, which i also followed, is based on the Version 1 of the service and the console. On the lower left corner there is a button that says "Switch to V1 console"
After this you will get the same interface as the tutorial and you can continue with it.
AWS does not have the Publish Button in the Lex V2. You will have to follow the following steps to publish your Bot in AWS Lex V2:
1. Build the bot
2. Create the bot version
3. Create an Alias
3. Associate that version to a required alias
so once you create the bot version, it is considered published.

Spring-Cloud-AWS vs AWS-SDK-Java 2

Ours is a Spring-Boot based application. For integration with AWS SNS and SQS, we have couple of options:
Use Spring-Cloud-AWS
Use AWS-SDK-Java 2
I wanted to know if there is any advantage in using one or the other.
When I ask AWS guys, they tell me that AWS SDK gets updated regularly and integration with SNS and SQS is not difficult. Hence, there is no need to integrate with Spring-Cloud-AWS.
I tried searching on gitter channel for Spring-Cloud and could not find any relevant information. Documentation does state that I can update the AWS-SDK version. Documentation does not state any compelling reason for not using AWS-SDK directly.
If anyone has some insights, please share.
From the AWS Spring Team:
"From now on, our efforts focus on 3.0 - based on AWS SDK 2.0."
So, if you need AWS SDK 2.0, you probably want to go directly with the SDK.
https://spring.io/blog/2021/03/17/spring-cloud-aws-2-3-is-now-available
For more on what's new on AWS Java SDK 2.0:
https://aws.amazon.com/blogs/developer/aws-sdk-for-java-2-0-developer-preview/
The main advantage over the AWS Java SDK is the Spring style convenience and head start we get by using the Spring project. As per the project documentation (https://cloud.spring.io/spring-cloud-aws/reference/html/##using-amazon-web-services)
Using the SDK, application developers still have to integrate the SDK
into their application with a considerable amount of infrastructure
related code. Spring Cloud AWS provides application developers already
integrated Spring-based modules to consume services and avoid
infrastructure related code as much as possible.

cloud-builds pub/sub topic appears to be unlisted or inaccessible

I'm attempting to create an integration between Bitbucket Repo and Google Cloud Build to automatically build and test upon pushes to certain branches and report status back (for that lovely green tick mark). I've got the first part working, but the second part (reporting back) has thrown up a bit of a stumbling block.
Per https://cloud.google.com/cloud-build/docs/send-build-notifications, Cloud Build is supposed to automatically publish update messages to a Pub/Sub topic entitled "cloud-builds". However, trying to find it (both through the web interface and via gcloud command line tool) has turned up nothing. Copious amounts of web searching has turned up https://github.com/GoogleCloudPlatform/google-cloud-visualstudio/issues/556, which seems to suggest that the topic referenced in that doc is now being filtered out of results; however, that issue seems to be specific to the visual studio tools and not GCP as a whole. Moreover, https://cloud.google.com/cloud-build/docs/configure-third-party-notifications suggests that it's still accessible, but perhaps only to Cloud Functions? And maybe only manually via the command line, since the web interface for Cloud Functions also does not display this phantom "cloud-builds" topic?
Any guidance as to where I can go from here? Near as I can tell, the two possibilities are that something is utterly borked in my GCP project and the Pub/Sub topic is either not visible just for me or has somehow been deleted, or I'm right and this topic just isn't accessible anymore.
I was stuck with the same issue, after a while I created the cloud-builds topic manually and created a cloud function that subscribed to that topic.
Build details are pushed to the topic as expected after that, and my cloud function gets triggered with new events.
You can check the existence of the cloud-builds topic an alternate way from the UI, by downloading the gcloud command line tool and, after running gcloud init, running gcloud pubsub topics list to list all topics for the configured project. If the topic projects/{your project}/topics/cloud-builds is not listed, I would suggest filing a bug to the cloud build team here.
Creating the cloud-builds topic manually won't work since it's a special topic that Google managed.
In this case, you have to go to the API central and disable the CloudBuild API, and then enable it again, the cloud-builds topic will be created for you. Enable and disable Cloud Build API

Is there documentation available for Google Cloud Dataflow?

Google Cloud Dataflow has been released in June 2014 (more information in this blog post), but I can't find any technical documentation on the developers section of the cloud.google.com website: https://cloud.google.com/developers/
Does someone knows where I can find more information, technical documentation about this product?
I'm really interested about how works topology, is it static or dynamic?.. etc..
Google Cloud Dataflow is now in Alpha stage. The documentation is now publicly available here: https://cloud.google.com/dataflow/. Follow the documentation link.
Please note that in Alpha - access to the managed service is limited to invite only. You can request access via the link above. Use the "Apply for Alpha" button.
The Cloud Dataflow SDK for Java has also been made public & open sourced on GitHub here: https://github.com/GoogleCloudPlatform/DataflowJavaSDK. Please note that you can download the SDK and run your Dataflow programs locally without having to execute them on the managed service. Local pipeline execution is a great way to get a feel for the programming model, but understand that the local execution is not parallelized.
We are also moving support over to StackOverflow. Please use the tag: google-cloud-dataflow.
Cheers - Eric
Google Cloud Dataflow is currently in private beta. You can apply here. Documentation is provided upon approval.

Is it possible to extend the WebJobs SDK?

Is there a way to extend the Azure WebJobs SDK? If I want something other than a queue, blob or table to trigger my job function.
As of the 1.1.0 release of the WebJobs SDK you can now write your own binding extensions. See the azure-webjobs-sdk-extensions repo for more information. That repo contains several extensions built on the new extensibility model that you can use in your applications (e.g. TimerTrigger, FileTrigger, SendGrid, etc.) Those extensions also serve as a demonstration of how to author your own extensions. The Binding Extensions Overview section of the Wiki walks you through the process of creating your own extension, starting from a sample template.
Sorry, that's not possible yet. However, you can always write your own event, use JobHost.Call inside it to invoke the function(s) and get all the benefits of WebJobs SDK (logging on dashboard, bindings, etc.)