Skip to content

Conversation

@suzukyz
Copy link
Contributor

@suzukyz suzukyz commented Nov 29, 2023

Related #421
To follow aws updates, I added new policies instead of aws-portal:*Billing.

This policy was used in these files.:

  • blea-gov-base-ct/lib/construct/iam.ts
  • blea-gov-base-standalone/lib/construct/iam.ts

Target policies:
Just only aws-portal:*Billing

Plan to fix:
I got fixed policies followed by this blog article(https://aws.amazon.com/jp/blogs/aws-cloud-financial-management/changes-to-aws-billing-cost-management-and-account-consoles-permissions/)

// New policy I got.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Condition": {
                "Bool": {
                    "aws:MultiFactorAuthPresent": "true"
                }
            },
            "Action": "iam:*",
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": "aws-portal:*Billing",
            "Resource": "*",
            "Effect": "Deny"
        },
        {
            "Sid": "AffectedPoliciesMigrator0",
            "Action": [
                "account:GetAccountInformation",
                "billing:GetBillingData",
                "billing:GetBillingDetails",
                "billing:GetBillingNotifications",
                "billing:GetBillingPreferences",
                "billing:GetContractInformation",
                "billing:GetCredits",
                "billing:GetIAMAccessPreference",
                "billing:GetSellerOfRecord",
                "billing:ListBillingViews",
                "billing:PutContractInformation",
                "billing:RedeemCredits",
                "billing:UpdateBillingPreferences",
                "ce:CreateAnomalyMonitor",
                "ce:CreateAnomalySubscription",
                "ce:CreateNotificationSubscription",
                "ce:CreateReport",
                "ce:DeleteAnomalyMonitor",
                "ce:DeleteAnomalySubscription",
                "ce:DeleteNotificationSubscription",
                "ce:DeleteReport",
                "ce:DescribeNotificationSubscription",
                "ce:DescribeReport",
                "ce:GetAnomalies",
                "ce:GetAnomalyMonitors",
                "ce:GetAnomalySubscriptions",
                "ce:GetCostAndUsage",
                "ce:GetCostAndUsageWithResources",
                "ce:GetCostCategories",
                "ce:GetCostForecast",
                "ce:GetDimensionValues",
                "ce:GetPreferences",
                "ce:GetReservationCoverage",
                "ce:GetReservationPurchaseRecommendation",
                "ce:GetReservationUtilization",
                "ce:GetRightsizingRecommendation",
                "ce:GetSavingsPlansCoverage",
                "ce:GetSavingsPlansPurchaseRecommendation",
                "ce:GetSavingsPlansUtilization",
                "ce:GetSavingsPlansUtilizationDetails",
                "ce:GetTags",
                "ce:GetUsageForecast",
                "ce:ListCostAllocationTags",
                "ce:ListSavingsPlansPurchaseRecommendationGeneration",
                "ce:ProvideAnomalyFeedback",
                "ce:StartSavingsPlansPurchaseRecommendationGeneration",
                "ce:UpdateAnomalyMonitor",
                "ce:UpdateAnomalySubscription",
                "ce:UpdateCostAllocationTagsStatus",
                "ce:UpdateNotificationSubscription",
                "ce:UpdatePreferences",
                "consolidatedbilling:GetAccountBillingRole",
                "consolidatedbilling:ListLinkedAccounts",
                "cur:GetClassicReport",
                "cur:GetClassicReportPreferences",
                "cur:PutClassicReportPreferences",
                "cur:ValidateReportDestination",
                "freetier:GetFreeTierAlertPreference",
                "freetier:GetFreeTierUsage",
                "freetier:PutFreeTierAlertPreference",
                "invoicing:GetInvoiceEmailDeliveryPreferences",
                "invoicing:GetInvoicePDF",
                "invoicing:ListInvoiceSummaries",
                "invoicing:PutInvoiceEmailDeliveryPreferences",
                "payments:CreatePaymentInstrument",
                "payments:DeletePaymentInstrument",
                "payments:GetPaymentInstrument",
                "payments:GetPaymentStatus",
                "payments:ListPaymentPreferences",
                "payments:MakePayment",
                "payments:UpdatePaymentPreferences",
                "tax:BatchPutTaxRegistration",
                "tax:DeleteTaxRegistration",
                "tax:GetTaxInheritance",
                "tax:GetTaxRegistrationDocument",
                "tax:ListTaxRegistrations",
                "tax:PutTaxInheritance"
            ],
            "Resource": "*",
            "Effect": "Deny"
        }
    ]
}

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT No Attribution (MIT-0).

@konokenj konokenj force-pushed the feature/fix-aws-portal-policy branch from f2dc779 to 6491979 Compare December 14, 2023 12:49
@konokenj konokenj enabled auto-merge (squash) December 14, 2023 12:51
@konokenj konokenj merged commit d2a1300 into aws-samples:main Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants