![]() You’ll usually want to pick the region closest to your users. } region = AWS services are available in different regions. SecretAccessKey: 'AWS_API_SECRET_ACCESS_KEY', We will use it as our programs interface with the SES Javascript client. Npm install add add Create the SES service class and expose the send methodĬreate the class below inside the src directory and call it ses-service.ts. Install the library with your command of choice: Install the starter project, then continue with installation below. Like I mentioned earlier, we will use this simple typescript starter project to create out SES service class. We are now ready to set up our Javascript client □ How to set up the Amazon SES Javascript Client csv file or copy the keys from the table: Here you have the opportunity to get the Access key ID and the Secret access key we will need. In step 5, you will get a confirmation of the created user. ![]() If all looks correct, click on the “Create user” button to create the user. In step 4, review your settings and make sure they match the screenshot: For our purposes we won’t need it, so let’s click on the “Next:Review” button to continue. This lets you add some helpful key/value pairs to help you organize or track/control the user in some way. Select the created group and click “Next:Tags” to continue: Select the “AmazonSESFullAccess” policy, and click the “Create group” button: Click on the “Add user to group” option on top of the page, and then click on the “Create group” button to create a new group:Ĭall the group name “SES-Group”, and in the search field, type SES to find the SES related policies. Attach existing policies directly = You can attach permissions directly to this user.ĪWS’s preferred method is option 1.Copy permissions from an existing user = If you have a user with the permissions you want, you can just copy those from that user with this option.Add user to group = We can attach permissions to groups to allow groups of users to inherit the permissions assigned to the group.Going back to our 3 options, here are our choices: In this case we will provide the user full access to the Amazon SES service, but not any other AWS service in our account. We could also limit the user to perform only certain operations within Amazon SES if we wanted to. This lets us control what each user is allowed to do in our AWS account. We can limit our new user to only have access to the Amazon SES service. ![]() In step 2, you have different options for attaching the proper permissions to this user. This option will give us the access key id and secret access key that the Javascript client will require:Ĭlick the “Next: Permissions” button at the bottom of the page to continue to step 2. In the next screen, in step 1, set a name for your user, and select “Access key – Programmatic access” as the credential type. ![]() Click on the “Users” sidebar link and click on the “Add users” button: In order to do so we’ll need to create some credentials.įind the IAM service in Amazon AWS. The Javascript client will need to authenticate with your Amazon AWS account. We will work using this starter project for this article. If you’d like a plain starter Node project to work with, check out this excellent Node and Typescript starter project. Since this series is focused on setup with Node and Typescript, you will need a Node and Typescript environment set up. □ Just want the code? Here is a link to the Github project for this part of the series. We will also learn how to build our template layout with the MJML library. We will now take a step further and learn how to use the AWS SES Javascript Client to create a template onto our Amazon SES account and send emails. If you missed that article, check it out, then head back here. Welcome to part 2 of our Amazon SES transactional emailer series! In part 1, we went through the steps to how to configure Amazon SES and our DNS to send authenticated emails from our email domain. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |