I installed following package (AWS SDK for JavaScript v3) , not the entire pacakge only SES module as described in here
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ses/index.html
my goal is to create Domain Identity using api.
I can't find the correct command to achieve my goal. I assume all available commands are listed here
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ses/globals.html
is it something impossible to do with this version of sdk ?
Related
I am currently developing an app using Reactjs. I had hidden my API keys and AWS keys in the dotenv file. But I just realized that this was absolutely not secured. My current set up is that my app is running in an S3 bucket on AWS, and I was wondering if I could use my EC2 instance to hide my keys from users, but still being able to get them in the app.
This is the first time I am developing an app in Reactjs and I don't really know where to start.
Have a look at AWS Amplify, it makes that process super easy.
Using React & AWS Amplify, you can create a serverless architecture for this type of setup with minimal work. You can get started by following the instructions at https://aws-amplify.github.io/docs/
In a nutshel :
Install with:
npm install -g #aws-amplify/cli
$ amplify configure
Then in your project :
amplify init
amplify add api #this will create your API as AWS Lambda functions exposed through Amazon API Gateway)
amplify push #to create all this on your AWS account for you
If you search for 'aws amplify react' you will easily find a dozen blog posting showing you how to get started. There are so many I can not recommend one in particular.
I'm using the Amazon's JavaScript AWS-SDK to set the region and credentials for me to use Cognito on my client application. The problem is that the AWS-SDK is huge! Is there a way to import only what I need or not importing anything from the AWS-SDK at all?
Here is my code:
import AWS from 'aws-sdk/global'
AWS.config.region = region
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: IdentityPoolId
})
From the Cognito SDK docs:
The Amazon Cognito Identity SDK for JavaScript depends on:
The CognitoIdentityServiceProvider service from the AWS SDK for
JavaScript
So you can't use it without the regular AWS SDK for JavaScript. However on that same page it tells you how to create a slimmed down version of the AWS SDK that only includes the needed Cognito dependencies. It also provides a direct link to a slimmed down version ready to use (but with a different namespace). I would recommend going here to download a custom version of the SDK that only includes the pieces you need.
There are specialized versions of the AWS SDK just for Cognito and you can build the AWS SDK just for the services that you require.
Here is an example just for Cognito:
Cognito Identity SDK
Here is the link to build your own custom AWS SDK:
AWS SDK for JavaScript in the Browser
I recommend customizing the official JavaScript SDK and not using specialized versions as the APIs and use cases can be different or limited in functionality.
There is a third option which is to not use the AWS SDKs at all and code everything by hand. This is definitely for experts as you have to deal directly with the REST API, creating signatures, etc.
A Google search will turn up lots of variants of the Cognito SDK.
I have created an API using the AWS Api Gateway Service, and am ready to use the javascript sdk in a simple webpage.
However, the instructions for using the javascript SDK here show an import for a js file called apigClient. I can only assume this is where the client class is stored for the api. However, when I generate the SDK for MY API, there is no such file (as in, the older file in the unzipped folder is lib. There is no js file in the root directory.)
Am I expected to create this file on my own? If so, I did not see any instructions to do so. Are there? What am I missing here?
I had the same problem, and I fixed it by deploying API.
See step4 "Deploy Your API" in this link.
https://aws.amazon.com/getting-started/projects/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/module-4/
So The API Gateway Javascript SDK is great to use in the front-end environment, but since the 10+ script files are required to be available globally, this does not play very nicely in an environment where most developers are used to importing npm packages.
Is there an example of anyone using the API Gateway SDK in backend Node.js environment? Here you cannot put the 10+ scripts in index.html file and I keep getting errors and when I try to make these files globally available for the SDK in Node environment.
There are two AWS SDKs for JavaScript. Use the one for node.js linked in the comment from MaiKaY. And here is the reference for the API Gateway portion of the SDK - http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/APIGateway.html
The Spring boot app is not working after deployed through GAE to cloud. Is any one having success with spring boot on GAE? *google app engine(GAE)
Have you taken a look at https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/helloworld-springboot ?
TL;DR
Copy pasting the read me file from the above link
Spring Boot based Hello World app
This sample shows how to run a Spring Boot application on Google
Cloud Platform. It uses the Google App Engine flexible
environment.
Before you begin
This sample assumes you have Java 8 installed.
Download Maven
These samples use the Apache Maven build system. Before getting
started, be sure to download and install it.
When you use Maven as described here, it will automatically download the needed
client libraries.
Create a Project in the Google Cloud Platform Console
If you haven't already created a project, create one now. Projects enable you to
manage all Google Cloud Platform resources for your app, including deployment,
access control, billing, and services.
Open the Cloud Platform Console.
In the drop-down menu at the top, select Create a project.
Give your project a name.
Make a note of the project ID, which might be different from the project
name. The project ID is used in commands and in configurations.
Enable billing for your project.
If you haven't already enabled billing for your project, enable
billing now. Enabling billing allows the application to
consume billable resources such as running instances and storing data.
Install the Google Cloud SDK.
If you haven't already installed the Google Cloud SDK, install and initialize
the Google Cloud SDK now. The SDK contains tools and libraries that
enable you to create and manage resources on Google Cloud Platform.
Install the Google App Engine SDK for Java
gcloud components update app-engine-java
gcloud components update
Run the application locally
Set the correct Cloud SDK project via gcloud config set project
YOUR_PROJECT to the ID of your application.
Run mvn spring-boot:run
Visit http://localhost:8080
Deploy to App Engine flexible environment
mvn gcloud:deploy
Visit http://YOUR_PROJECT.appspot.com.
Java is a registered trademark of Oracle Corporation and/or its affiliates.