I want to add if else condition in Serverless where I want to check if a particular resource (eg. AWS WAF)exists or not.
I am using serverless-plugin-ifelse
I want to know if it is possible to do this and how should I approach this. Please feel free to give any examples related to if-else and WAF
Related
I have a series of logs inside my Cloudwatch Log groups.
They look like this:
2023-01-27T08:00:00 - {LogTitle} Unfortunately {DataName} has an error {error}
I want to be able to send individual emails for specific LogTitles and specific DataNames.
I might want to know about the "LogTitle": "Importer" and get an email but I don't want others as they happen too frequently.
Any idea how I should approach this?
I have read about using Dimensions inside a metric alarm and metric filter but I don't know much about it.
Also, I intend to use Terraforms to code this AWS log service as infrastructure. That way I can deploy it again easily without going through manual AWS set up.
Any help appreciated to point me in the right direction.
Thanks.
Is it possible somehow to know the sequence to perform a specific task?
For instance, domain registration.
API commands documented here: https://api.ovh.com/console/ but in order to do a specific task you need to know the sequence (create cart, availability check, create plan, etc)
There are no documentations about sequence at the moment. You have to find out by yourself. For example you need to checkout, try to execute that command and see what do you need in order to complete. Then you execute that command which should give you results and then see whats missing for that command. And by doing this, you can find the starting point.
As you say, there is no documentation about this API calls sequences to perform a given action.
But as OVH API is used by OVH Manager (the GUI where you can order & configure products), one way of knowing the sequence can be to make an order once via the OVH Manager, and thanks to the developer console of your browser, see which calls are made and then see the sequence.
This is definitively a boring solution, but that's the only one I know.
I was trying to find ways to automatically create a few dummy users with CDK, like this https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminCreateUser.html
but could not find anything useful
Is there any constructs or way we can achieve this?
There is not always a construct class available for the part of a service you'd like to configure but there should be automatically generated Cfn prefixed resources which map 1:1 onto all available AWS CloudFormation resources and properties. As long as it's possible in CloudFormation it should be possible in the CDK.
If you look at the aws-cdk/aws-cognito docs you'll notice two categories on the left hand menu Constructs and a little further down you will find CloudFormation Resources. One of those CloudFormation Resources is CfnUserPoolUser which should be what you are looking for.
If there is any issues utilizing the Cfn resources you can review options for escape hatches to dig even deeper in to the Cfn constructs.
By going through this API documentation page, is it possible to tell which database is being used in the backend?
Zomato API
MySQL would require a php file on the server to handle the requests, make queries, pack data in JSON format then send it back to the device. But in this case parameters are passed to .json files. Please advice
There is no way to "see through" to what the backend service actually used to provide you with the information you may query for. Are you sure you want to continue using this product? The site notes that Zomato will no longer be available to individuals, and that your API key will be disabled if you don't use it monthly.
I haven't read the specs for that particular API. But in general, is it possible to tell what database is being used on the back end by studying an API? No. That's the whole point of an API: It's supposed to shield the API-user from implementation details.
It's probably true that in many cases you could make reasonable guesses about what tools are being used on the back end. Like if you see that the API gives you a syntax for doing comparisons that looks exactly like the proprietary compare function used in Foobar SQL and not found in any other database product, that would be a strong clue. But even something like that wouldn't be proof. Maybe originally they were using Foobar SQL, then they switched to another database, but to maintain compatibility they wrote code to translate the Foobar SQL compare to standard SQL syntax.
I would like to be able to generate custom bit.lys (http://bit.ly/thecakeisalie type things) through their API. This does not appear to be possible, but I thought I'd check; does anyone happen to know otherwise?
This unfortunately had to be removed for our free users due to on-going abuse. All of the custom bitlinks on bit.ly are created in the same key space, so allowing for automated creation there quickly leads to there being no sane options availble for anybody else.
That being said, we have recently added the ability for our paid customers to create custom bitlinks if they are using a custom domain. In this case, our customers get their own key space so creating custom bitlinks en-mass isn't a problem.
It was removed from the API. I like many others were trying to do this and bit.ly's support email replied saying it has been removed. Similar experiences on their ApiDocumentation wiki here.