Not able to submit request for quota increase in GCP for any resource available - google-cloud-platform

I have been trying to increase the quota limit for multiple GCP resources including compute engine and IP addresses but always get a popup that "not eligible for quota increase". I found this issue happening with other users as well but it was still unsolved for all of them. Just to clarify, the account I am running is were part of the "GCP for Startup" program with billing enabled globally. I have added relevant screen snips here and here

I have researched and replicated on my side. Basically this is modifiable going to the console by following the next steps:
Go to Cloud Console > IAM & admin > Quotas page
Search the quota limit for your appropriate region
Submit the request with the new limit and save the Case IDs shared with you. You should also receive an email confirmation.
On my side, I could checkbox and edit so after some minutes a received an email with the confirmation. As per your images, I see that the boxes are on gray and you are unable to edit the quotas, therefore you would need to contact the GCP sales team to inspect further.
You could reach by **1 800-654-2533** from Monday to Friday 6AM-6PM CST or make use of the chat or requesting a call back in the link contact provided
cheers,

Related

GCP logging: Find all resources (recently) used by a specific user

This is part of my journey to get a clear overview of which users/service accounts are in my GCP Project and when they last logged in.
Endgoal: to be able to clean up users/service-accounts if needed when they weren't on GCP for a long time.
First question:
How can I find in the logs when a specific user used resources, so I can determine when this person last logged in?
You need the Auditlogs and to see them you can run the following query in Cloud Logging:
protoPayload.#type="type.googleapis.com/google.cloud.audit.AuditLog"
protoPayload.authenticationInfo.principalEmail="your_user_name_email_or_your_service_account_email"
You can also check the Activity logs and filter on a user:
https://console.cloud.google.com/home/activity
Related questions + answers:
Pull "last access" information on projects from Google Cloud Platform (GCP)
IAM users and last login date in google cloud
How to list, find, or search iam policies across services (APIs), resource types, and projects in google cloud platform (GCP)?
There is now also the newly added Log Analytics.
This allows you to use SQL to query your logs.
Your logging buckets _Default and _Required need to be upgraded to be able to use Log Analytics:
https://cloud.google.com/logging/docs/buckets#upgrade-bucket
After that you use for example the console to use SQL on your logs:
https://console.cloud.google.com/logs/analytics
Unfortunately, at the moment you can only query the logs that were created after you've switched on Log Analytics.
Example query in the Log Analytics:
SELECT
timestamp,
proto_Payload.audit_log.authentication_info.principal_email,
auth_info.resource,
auth_info.permission,
auth_info.granted
FROM
`logs__Default_US._AllLogs`
left join unnest(proto_Payload.audit_log.authorization_info) auth_info
WHERE
timestamp > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
and proto_payload.type = "type.googleapis.com/google.cloud.audit.AuditLog"
and proto_Payload.audit_log.authentication_info.principal_email in ("name_of_your_user")
ORDER BY
timestamp

Cannot remove deleted account from AWS Organisation

I have created an Organisation with the following set up:-
- Root
-- Acc1 (Management Account)
-- Acc2
-- Acc3
-- Acc4
I have deleted Acc2, Acc3, and Acc4 over a week ago. However, I still cannot remove them from my Organisaton. I get a ConstraintViolationException The member account must be configured with a valid payment method, such as a credit card.
However, I cannot do that as I have deleted them.
The quick solution is to close the account by clicking on it's name and then in the top right clicking on close instead of remove. After 90 days the account and it's resources are unrecoverable.
This is the info that I got off of amazon after trying to solve this issue for myself. The account needs be a standalone account to be removed from under my org.
That's why I got the ConstraintViolationException it then goes into detail about what specifically needs to be added to the account to remove it. In my case:
The member account must be configured with a valid payment method,
such as a credit card.
Meaning that the account needs credit card information to pay for the services it may use in the future. Before, the account didn't need that info because it was linked to the credit card of my organization.
You do have the option of signing into that account and adding the info whatever constraint is needed but that's the whole point - That is not my account and I want it removed.
The only other option is to close the account and wait the 3 months for it to be removed from my org. After that I don't care if it's recoverable or not
Refs:
https://docs.aws.amazon.com/organizations/latest/APIReference/API_RemoveAccountFromOrganization.html
https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/close-account.html?icmpid=docs_orgs_console

Amazon QuickSight embedded dashboard - how to cache user session in my webapp (billing and timing concern)

I have embedded Amazon QuickSight dashboard in my web application by using amazon-quicksight-embedding-sdk (followed https://learnquicksight.workshop.aws/en/dashboard-embedding.html).
The user session seems to last many hours as mentioned in https://docs.aws.amazon.com/quicksight/latest/APIReference/API_GetDashboardEmbedUrl.html
When I requested the embed URL directly from my web browser, I could see that it was valid for many hours.
But my web app will request a new embed URL when user restarts it (by closing/reopening tab/browser). Does that mean a new user session was created and billed.
Is it possible to store the embed URL and to reuse it (as long as the user session lasts) for the case the same user closes the tab/browser and open the web app and the dashboard again (of course in the same browser)?
I tried to store the embedURL as a cookies named "embed_url". But calling amazon-quicksight-embedding-sdk.embedDashboard({url: embed_url}) resulted in
"Embedding failed because of invalid URL or authorization code. Both
of these must be valid and the authorization code must not be expired
for embedding to work."
I was sure the embed_url was still valid because requesting it by the browser directly worked.
Which "authorization code" is mentioned in the above error message? What did I miss or is it actually not possible?
Beside the billing concern, I've noticed that the call to get the embedURL took time (more than 5 seconds, eu-central-1) while the embedding took less (3 seconds). I thought I could improve the dashboard loading time by reusing the gotten embedURL. Any comments about the timing? Is it normal or did I do something wrong so that it was so slow? My test dashboard has only 1 diagram with unchanged dataset.
As per the Quicksight Pricing Page, if you're creating an embedded dashboard for a Quicksight "Reader", then you're paying $0.30/session per 30-minute logged-in-session for this Reader.
The validity of the session can be set in the SessionLifetimeInMinutes parameter of the GetDashboardEmbedUrl API, and has an upper bound of 600 minutes (10 hours).
As an example, suppose you set SessionLifetimeInMinutes to 600 mins for your Reader user. Also suppose that this user stayed logged in and uses the dashboard for 10 hours continuously, then that would equate to 20 sessions of usage (since the billing is in increments of 30-min chunks). At first glance it would seem that this would cause $0.30/session * 20 session-chunks = $6 to be billed.
However, as per the pricing page, there is an upper bound of $5.00 per month for every Reader. Which means that this Reader can never exceed $5 per month regardless of how many Quicksight sessions (of whatever duration) are created for them. So no matter how many times you call the GetDashboardEmbedUrl API for a given Reader, you're capped to $5/month for this user.
Also of use as to what constitutes a Reader session (from the pricing page):
When does a Reader Session start and end?
A Reader Session starts with user-initiated action (e.g., login, dashboard load, page refresh, drill-down or filtering) and runs for next 30-minutes.
Keeping Amazon QuickSight open in a background browser window/tab does not result in active sessions until the Reader initiates action on page.
But my web app will request a new embed URL when user restarts it (by closing/reopening tab/browser). Does that mean a new user session was created and billed.
I'm not 100% sure about this, but yes I believe a refresh (or open/close) of the tab results in a new session for the same user.
A Reader Session starts with user-initiated action (e.g., login, dashboard load, page refresh, drill-down or filtering) and runs for next 30-minutes.
The above excerpt is from the pricing page. So it does seem that page refresh (and thus another call to GetDashboardEmbedUrl) will trigger a new session for the user.
Which "authorization code" is mentioned in the above error message?
The GetEmbedDashboardUrl API response is a JSON object that looks like this:
{
"Status": 200,
"EmbedUrl": "https://us-east-1.quicksight.aws.amazon.com/embed/f4147cd0d4d_BLAH_BLAH_...",
"RequestId": "c15a7bad-629e-444a-b643-ff3142c9ae41"
}
If you look closer at the EmbedUrl, apart from the dashboard url itself, there are also these query-string parameters:
isauthcode
code
identityprovider
statePersistenceEnabled
potentially: other params too
The code parameter (embedded within the embedUrl) is the "authorization code" that you asked about.
Is it possible to store the embed URL and to reuse it (as long as the user session lasts) for the case the same user closes the tab/browser and open the web app and the dashboard again (of course in the same browser)?
No, that can't be done. As it says in the link you shared:
The following rules apply to the combination of URL and authorization code:
- They must be used together.
- They can be used one time only.
- They are valid for 5 minutes after you run this command.
So the embedURL and its associated auth code can only be used once together. Makes sense since this will prevent MITM replay attacks among other scenarios. Also I actually tried to cache the response and then re-use the embedUrl in case of a cache-hit, since this would improve the end-user experience. But this didn't work - a "replay" of the embedUrl is blocked by QuickSight, as mentioned in their doc.
Any comments about the timing?
This has been our experience also. The GetDashboardEmbedUrl REST API takes around 5-7 seconds (us-east-1) for our app and then the actual embedding takes another 3-5 seconds. Not great, but I don't see a way around this poor user experience as of now.

created one user defined metrics with which an alert is generated every time a firewall is created/modified/deleted but alert automatically recovers

I have created one user defined metrics with which an alert is generated every time a firewall is created/modified/deleted.
and configured the alert
Alerts get triggered and incident is generated but after some time alert automatically cleared with email "Alert recovered". I dont want the alert to be cleared automatically but should be there for ops team to investigate and acknowledge.
Please suggest what is missing in my configuration?
You can aggregate events over period of time, e.g. a day; But then it will only trigger on first occurrence.
The best solution, I think, is to edit the alerting policy and uncheck "Notify on incident resolution".
Incidents will be resolved, but ops team can still check them via link in the e-mail.
If you think that function should be available, you can file a Feature Request at Google Public Issue Tracker.

Enabling export of GCP billing pricing data to BigQuery gives security warning: This app isn't verified (gstatic)

I want to activate the export of GCP billing data to BigQuery. The BigQuery Data Transfer Service API is enabled in my target project and I have created a BigQuery dataset in the same project. There are two data exports that can be enabled: "Daily cost detail" data and "Pricing" data. Enabling "Daily cost detail" data export was successful, so I think that the basic setup is fine.
However, when I try to activate the "Pricing" data export with the same settings, something strange happens. I configure the target project and target BigQuery datastore and click "Save". Previously, for "daily cost detail", the process was finished here. But for "pricing", now a popup window opens, asking me to re-authenticate with my Google account. Once I do that, I receive a warning stating that "This app isn't verified" and "This app hasn't been verified by Google yet.", referring to "gstatic":
Screenshot of the warning message
I'm unsure if something is going wrong here, because I never got this popup when enabling the daily cost detail export. And it seems strange that this integral function wouldn't be verified by Google itself. A colleague of mine tried to activate the pricing data export with their user account but the same thing happens. I talked to a Google representative in the support chat but they told me that this is out of their scope.
Is this warning supposed to happen when enabling the export of pricing data to BigQuery? Have others received the same warning? Is it safe to proceed?