Skip to content

Instantly share code, notes, and snippets.

@ZZANZU
Created August 5, 2022 16:32
Show Gist options
  • Save ZZANZU/c0c77614f79c9679ecf77f48e1bbeb71 to your computer and use it in GitHub Desktop.
Save ZZANZU/c0c77614f79c9679ecf77f48e1bbeb71 to your computer and use it in GitHub Desktop.
client = boto3.client('sns')
resource = boto3.resource('sns')
async def create_endpoint_arn(token):
try:
response = client.create_platform_endpoint(
PlatformApplicationArn=config.SNS_PLATFORM_APPLICATION_ARN,
Token=token
)
return response['EndpointArn']
except:
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment