Deploy AWS SageMaker pipeline using the cloud development kit (CDK) - terraform-provider-aws

I'm looking to deploy the SageMaker pipeline using CDK (https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnPipeline.html) but could not find any code examples. Any pointers?

CDK L1 Constructs correspond 1:1 to a CloudFormation resource of the same name. The construct props match the resouce properties. The go-to source is therefore the CloudFormation docs.
The AWS::SageMaker::Pipeline docs have a more complete example.

pipeline.definition() outputs the needed cloudformation content... as noted above, there is not yet cdk support for L1 services.

Related

AWS Amplify GraphQL API changing the nested level depth for codegenerator

In AWS Amplify CLI when you add a GrpahQL API with
amplify add api
you are asked for the max level depth of the generated code. The default nested level is 3.
In my case it turns out that the max depth is not enough and I need to increase it.
Is there a way to do that?
I'we tried to run
amplify update api
However I wasn't asked again about the maximum level depth of the generated code during the process of the update.
Finally I've found the solution in this github asnwer.
Turns out that the file .graphqlconfig.yml is responsible for the AWS Amplify GraphQL API.
The property projects.YOUR-API-NAME.extensions.amplify.maxDepth is responsible for changing the nested level depth for the codegenerator. Now my .graphqlconfig.yml file looks in the following way and it works:
projects:
YOUR-API-NAME:
schemaPath: amplify/backend/api/zlmvp/build/schema.graphql
includes:
- src/graphql/**/*.ts
excludes:
- ./amplify/**
extensions:
amplify:
codeGenTarget: typescript
generatedFileName: src/API.ts
docsFilePath: src/graphql
maxDepth: 5
extensions:
amplify:
version: 3

Can you have multiple endpoints/functions from a single .NET Core project in Google Cloud Run?

I have a single .NET Core .proj file and a single Google Cloud project. The .NET Core project is very simple with a single class implementing IHttpFunction and implementing HandleAsync which is the entrypoint. I have a Cloud Build trigger connected to this project's Git repository which is set to run whenever a commit is pushed into main.
I would like to have more functions-- and hoping to not duplicate common functionality between them -- add those functions to the same project. But when I have multiple classes implementing IHttpFunction, Cloud Build fails.
I think there are at least 2 other ways to do this:
Deploy manually and select a function - but can I do this with Cloud Build triggers too?
Have all functions go through a single "dispatcher" endpoint - which seems messy
What's a good way to do this?

Is it possible to generate models manually?

I have a JS project that uses aws services as a backend (Cognito, AppSync, S3, etc).
I use AWS Amplify to access these services but do not use the amplify CLI; all aws services are configuredd manually.
Regarding AppSync, I have a little script that reads the schema (downloaded manually from the appsync console) and then generates Typescript operations and operation types files (using amplify-graphql-docs-generator and amplify-graphql-types-generator).
Is it possible to do the same for models, ie generate a models file in typescript based on a local schema file ? Or in other words how can I replicate amplify codegen models inside a project that was not setup with the amplify-cli ?
You can probably check the implementation of the amplify codegen and find its inner workings
https://github.com/aws-amplify/amplify-cli/tree/master/packages/amplify-codegen
Or if you don't mind using the Amplify CLI, you can hook up an existing AppSync project running the following commands in sequence at the project root:
amplify init
amplify add codegen --apiId xxxx
amplify codegen

WSO2 API build and deployment

I have created and published API's using API manager 2.6.0 now I need to push these changes to another environment like system & UAT testing environment.
Can someone help me on how I can configure any repository to push the APIs created using API manager and move from one environment to another. I checked few sites related to WSO2 migration and CI/CD implementation but I could not able to do that properly so I am looking for high level explanation to use repository and migration to different environments.
You can export and import APIs from different environments using the migration APIs or the CLI tool:
Export API as seen here: https://docs.wso2.com/display/AM210/Migrating+the+APIs+to+a+Different+Environment
Export CLI as seen here:
https://docs.wso2.com/display/AM260/Migrating+the+APIs+to+a+Different+Environment
The exported APIs are a set of json and xml files that can be templated, and unless your APIs endpoints in other environments are the same as your development one, you will have to modify the exported APIs jsons and xmls to fit the other enviroment's data.
The best way to set up a repository, will be then to:
Export from your development environment the API to a local machine
Create a template out of it to be used with your favorite template deployment engine
Upload this templates to a repository manager (nexus, artifactory...)
Write the script to fill the template for each environment,
Create another script to call the APIM import CLI or API to import the filled template to each enviroment.
This is all best done within some CI/CD pipeline.

Generating Swagger Docs in Firebase Cloud Functions project

Is it possible to generate Swagger Spec file from function comments in firebase cloud functions? If so, how can we do it?
I see the cloud functions code to be more like serverless, so wondering if this is possible.
I haven't found an automatic way, but there are plenty of libraries to choose from.
I'm using express and nodejs in my Firebase Function implementations, and for me,
Swagger doc generation can be implemented via the following libraries:
https://github.com/scottie1984/swagger-ui-express
https://github.com/Surnet/swagger-jsdoc
You can find other libraries at:
https://swagger.io/tools/open-source/open-source-integrations/
This will create a new HTTP endpoint, which will serve an HTML page of a swagger doc.
There is not an automatic way to do this at this time. I think you could build your own but seems like it would be a lot of work.

Resources