Amplify Toolbox
    Preparing search index...

    APNs (Apple Push Notification service) channel configuration, using APNs token authentication (a .p8 signing key). The sensitive .p8 key material is supplied via an Amplify secret(); the non-secret identifiers are plain props. Provide this to enable the APNs channel on the created End User Messaging (Pinpoint) application.

    import { secret } from '@aws-amplify/backend';

    defineNotifications({
    apns: {
    tokenKey: secret('APNS_SIGNING_KEY'), // contents of the AuthKey_XXXX.p8
    tokenKeyId: 'ABC123DEFG',
    teamId: 'DEF456GHIJ',
    bundleId: 'com.example.app',
    },
    });
    type ApnsChannelProps = {
        bundleId: string;
        sandbox?: boolean;
        teamId: string;
        tokenKey: BackendSecret;
        tokenKeyId: string;
    }
    Index

    Properties

    bundleId: string

    The bundle identifier assigned to your iOS app.

    sandbox?: boolean

    Configure the APNs sandbox channel (for development builds signed with a development provisioning profile) instead of the production APNs channel. Toggling this on an already-deployed stack REPLACES the APNs channel resource (production AWS::Pinpoint::APNSChannel and sandbox AWS::Pinpoint::APNSSandboxChannel are distinct CFN resource types), so the application briefly has no configured APNs channel during the swap — treat a flip on a live stack as a destructive change.

    false
    
    teamId: string

    The 10-character identifier assigned to your Apple Developer account team.

    tokenKey: BackendSecret

    Amplify secret() holding the APNs token signing key — the full contents of the AuthKey_<tokenKeyId>.p8 file downloaded from the Apple Developer portal. Resolved at deploy time and written to the APNs channel's TokenKey; never stored in the CloudFormation template as plain text.

    tokenKeyId: string

    The 10-character key identifier assigned to your APNs signing key (CFN TokenKeyId).