Looking for how to use this in your app?See Frontend Libraries →
既存のAWSリソースを使用する
既存のAmazon PinpointリソースをAmplifyバックエンドまたはフロントエンドアプリケーションで使用するには、addOutputメソッドを使用して、バックエンドリソースの出力をamplify_outputs.jsonファイルに表示します:
amplify/backend.ts
import { defineBackend } from "@aws-amplify/backend"
const backend = defineBackend({})
backend.addOutput({ analytics: { amazon_pinpoint: { aws_region: "<your-aws-region>", app_id: "<your-pinpoint-app-id>", }, },})IAMポリシーの更新
Amazon PinpointはrecordおよびidentifyUser APIを使用するために、AWS Identity and Access Management (IAM)ポリシーが必要です:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["mobiletargeting:UpdateEndpoint", "mobiletargeting:PutEvents"], "Resource": ["arn:aws:mobiletargeting:*:<your-account-id>:apps/<your-pinpoint-app-id>*"] } ]}